Skip to content

Commit

Permalink
Update dependency rust to v1.83.0 (#1186)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <[email protected]>
  • Loading branch information
renovate[bot] and ahl authored Dec 5, 2024
1 parent 21d2422 commit b604134
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 58 deletions.
2 changes: 1 addition & 1 deletion dropshot/src/from_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ macro_rules! de_value {
};
}

impl<'de, 'a, Z> Deserializer<'de> for &'a mut MapDeserializer<'de, Z>
impl<'de, Z> Deserializer<'de> for &mut MapDeserializer<'de, Z>
where
Z: MapValue + Debug + Clone + 'static,
{
Expand Down
4 changes: 2 additions & 2 deletions dropshot/src/schema_util.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Oxide Computer Company
// Copyright 2024 Oxide Computer Company

//! schemars helper functions
Expand Down Expand Up @@ -273,7 +273,7 @@ impl<'a> ReferenceVisitor<'a> {
}
}

impl<'a> schemars::visit::Visitor for ReferenceVisitor<'a> {
impl schemars::visit::Visitor for ReferenceVisitor<'_> {
fn visit_schema_object(&mut self, schema: &mut SchemaObject) {
if let Some(refstr) = &schema.reference {
let definitions_path = &self.generator.settings().definitions_path;
Expand Down
6 changes: 3 additions & 3 deletions dropshot/src/to_map.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Oxide Computer Company
// Copyright 2024 Oxide Computer Company

use std::{collections::BTreeMap, fmt::Display};

Expand Down Expand Up @@ -68,7 +68,7 @@ macro_rules! ser_t_err {

}

impl<'a, Input> Serializer for &'a mut MapSerializer<Input> {
impl<Input> Serializer for &mut MapSerializer<Input> {
type Ok = BTreeMap<String, String>;
type Error = MapError;

Expand Down Expand Up @@ -204,7 +204,7 @@ impl SerializeStruct for MapSerializeStruct {
/// extending this to convert other scalars into strings, but for now we'll just
/// work with strings.
struct StringSerializer;
impl<'a> Serializer for &'a mut StringSerializer {
impl Serializer for &mut StringSerializer {
type Ok = String;
type Error = MapError;

Expand Down
36 changes: 18 additions & 18 deletions dropshot/tests/fail/bad_trait_channel4.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ note: required by a bound in `dropshot::Query`
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
--> tests/fail/bad_trait_channel4.rs:16:1
--> tests/fail/bad_trait_channel4.rs:41:18
|
16 | #[dropshot::api_description]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
41 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
|
= help: the following other types implement trait `schemars::JsonSchema`:
&'a T
Expand All @@ -74,13 +74,12 @@ note: required by a bound in `dropshot::Query`
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
--> tests/fail/bad_trait_channel4.rs:16:1
--> tests/fail/bad_trait_channel4.rs:41:18
|
16 | #[dropshot::api_description]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
41 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
Expand All @@ -100,12 +99,11 @@ note: required by a bound in `dropshot::Query`
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
--> tests/fail/bad_trait_channel4.rs:41:18
--> tests/fail/bad_trait_channel4.rs:26:18
|
41 | _params: Query<QueryParams>,
26 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
|
= help: the following other types implement trait `schemars::JsonSchema`:
Expand All @@ -125,9 +123,9 @@ note: required by a bound in `dropshot::Query`
| ^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
--> tests/fail/bad_trait_channel4.rs:41:18
--> tests/fail/bad_trait_channel4.rs:26:18
|
41 | _params: Query<QueryParams>,
26 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
Expand All @@ -150,10 +148,10 @@ note: required by a bound in `dropshot::Query`
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
--> tests/fail/bad_trait_channel4.rs:26:18
--> tests/fail/bad_trait_channel4.rs:16:1
|
26 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
16 | #[dropshot::api_description]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
|
= help: the following other types implement trait `schemars::JsonSchema`:
&'a T
Expand All @@ -170,12 +168,13 @@ note: required by a bound in `dropshot::Query`
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
--> tests/fail/bad_trait_channel4.rs:26:18
--> tests/fail/bad_trait_channel4.rs:16:1
|
26 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
16 | #[dropshot::api_description]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
Expand All @@ -195,6 +194,7 @@ note: required by a bound in `dropshot::Query`
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
--> tests/fail/bad_trait_channel4.rs:20:5
Expand Down
18 changes: 9 additions & 9 deletions dropshot/tests/fail/bad_trait_channel5.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ note: required by a bound in `dropshot::Query`
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
--> tests/fail/bad_trait_channel5.rs:17:1
--> tests/fail/bad_trait_channel5.rs:41:18
|
17 | #[dropshot::api_description]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
41 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
Expand All @@ -51,12 +51,11 @@ note: required by a bound in `dropshot::Query`
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
--> tests/fail/bad_trait_channel5.rs:41:18
--> tests/fail/bad_trait_channel5.rs:27:18
|
41 | _params: Query<QueryParams>,
27 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
Expand All @@ -79,10 +78,10 @@ note: required by a bound in `dropshot::Query`
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
--> tests/fail/bad_trait_channel5.rs:27:18
--> tests/fail/bad_trait_channel5.rs:17:1
|
27 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
17 | #[dropshot::api_description]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `QueryParams`, which is required by `QueryParams: serde::de::DeserializeOwned`
|
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `QueryParams` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
Expand All @@ -102,6 +101,7 @@ note: required by a bound in `dropshot::Query`
|
| pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^^^^^^^ required by this bound in `Query`
= note: this error originates in the attribute macro `dropshot::api_description` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> QueryParams: serde::de::Deserialize<'de>` is not satisfied
--> tests/fail/bad_trait_channel5.rs:21:5
Expand Down
8 changes: 4 additions & 4 deletions dropshot/tests/fail/bad_trait_channel6.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ error: expected identifier, found `0x1de`
| while parsing this struct

error[E0063]: missing fields `x` and `y` in initializer of `Ret`
--> tests/fail/bad_trait_channel6.rs:31:17
--> tests/fail/bad_trait_channel6.rs:48:17
|
31 | let _ = Ret { "Oxide".to_string(), 0x1de };
48 | let _ = Ret { "Oxide".to_string(), 0x1de };
| ^^^ missing `x` and `y`

error[E0063]: missing fields `x` and `y` in initializer of `Ret`
--> tests/fail/bad_trait_channel6.rs:48:17
--> tests/fail/bad_trait_channel6.rs:31:17
|
48 | let _ = Ret { "Oxide".to_string(), 0x1de };
31 | let _ = Ret { "Oxide".to_string(), 0x1de };
| ^^^ missing `x` and `y`
8 changes: 4 additions & 4 deletions dropshot/tests/fail/bad_trait_endpoint6.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ error: expected identifier, found `0x220`
| while parsing this struct

error[E0063]: missing fields `x` and `y` in initializer of `Ret`
--> tests/fail/bad_trait_endpoint6.rs:31:27
--> tests/fail/bad_trait_endpoint6.rs:46:27
|
31 | Ok(HttpResponseOk(Ret { "Oxide".to_string(), 0x1de }))
46 | Ok(HttpResponseOk(Ret { "220".to_string(), 0x220 }))
| ^^^ missing `x` and `y`

error[E0063]: missing fields `x` and `y` in initializer of `Ret`
--> tests/fail/bad_trait_endpoint6.rs:46:27
--> tests/fail/bad_trait_endpoint6.rs:31:27
|
46 | Ok(HttpResponseOk(Ret { "220".to_string(), 0x220 }))
31 | Ok(HttpResponseOk(Ret { "Oxide".to_string(), 0x1de }))
| ^^^ missing `x` and `y`
10 changes: 5 additions & 5 deletions dropshot/tests/integration-tests/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Oxide Computer Company
// Copyright 2024 Oxide Computer Company

//! Tests for configuration file.
Expand Down Expand Up @@ -310,12 +310,12 @@ async fn test_config_bind_address_https() {
key_file: NamedTempFile,
}

impl<'a>
impl
TestConfigBindServer<
hyper_rustls::HttpsConnector<
hyper_util::client::legacy::connect::HttpConnector,
>,
> for ConfigBindServerHttps<'a>
> for ConfigBindServerHttps<'_>
{
type Context = i32;

Expand Down Expand Up @@ -390,12 +390,12 @@ async fn test_config_bind_address_https_buffer() {
serialized_key: Vec<u8>,
}

impl<'a>
impl
TestConfigBindServer<
hyper_rustls::HttpsConnector<
hyper_util::client::legacy::connect::HttpConnector,
>,
> for ConfigBindServerHttps<'a>
> for ConfigBindServerHttps<'_>
{
type Context = i32;

Expand Down
8 changes: 3 additions & 5 deletions dropshot/tests/integration-tests/tls.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Oxide Computer Company
// Copyright 2024 Oxide Computer Company

//! Test cases for TLS support. This validates various behaviors of our TLS
//! mode, including certificate loading and supported modes.
Expand Down Expand Up @@ -33,15 +33,13 @@ type VerifyCertFn<'a> = Box<

struct CertificateVerifier<'a>(VerifyCertFn<'a>);

impl<'a> std::fmt::Debug for CertificateVerifier<'a> {
impl std::fmt::Debug for CertificateVerifier<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("CertificateVerifier... with some function?")
}
}

impl<'a> rustls::client::danger::ServerCertVerifier
for CertificateVerifier<'a>
{
impl rustls::client::danger::ServerCertVerifier for CertificateVerifier<'_> {
fn verify_server_cert(
&self,
end_entity: &rustls::pki_types::CertificateDer<'_>,
Expand Down
4 changes: 2 additions & 2 deletions dropshot_endpoint/src/api_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ struct SupportModuleGenerator<'ast> {
tag_config: Option<&'ast ApiTagConfig>,
}

impl<'ast> SupportModuleGenerator<'ast> {
impl SupportModuleGenerator<'_> {
fn make_api_description(&self, doc: TokenStream) -> TokenStream {
let dropshot = &self.dropshot;
let trait_ident = &self.item_trait.ident;
Expand Down Expand Up @@ -849,7 +849,7 @@ impl<'ast> SupportModuleGenerator<'ast> {
}
}

impl<'ast> ToTokens for SupportModuleGenerator<'ast> {
impl ToTokens for SupportModuleGenerator<'_> {
fn to_tokens(&self, tokens: &mut TokenStream) {
let vis = &self.item_trait.vis;
let module_ident = self.module_ident;
Expand Down
4 changes: 2 additions & 2 deletions dropshot_endpoint/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ fn validate_param_ty<'ast>(
errors: &'ast ErrorSink<'store, Error>,
}

impl<'store, 'ast> Visit<'ast> for Visitor<'store, 'ast> {
impl<'ast> Visit<'ast> for Visitor<'_, 'ast> {
fn visit_bound_lifetimes(&mut self, i: &'ast syn::BoundLifetimes) {
let name_str = self.name_str;
let kind = self.kind;
Expand Down Expand Up @@ -488,7 +488,7 @@ impl<'ast> RqctxTy<'ast> {
}
}

impl<'ast> fmt::Debug for RqctxTy<'ast> {
impl fmt::Debug for RqctxTy<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
RqctxTy::Function(ty) => {
Expand Down
4 changes: 2 additions & 2 deletions dropshot_endpoint/src/syn_parsing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Oxide Computer Company
// Copyright 2024 Oxide Computer Company
//
// Portions of this file are adapted from syn (https://github.com/dtolnay/syn),
// and are used under the terms of the Apache 2.0 license.
Expand Down Expand Up @@ -376,7 +376,7 @@ impl<'a> FilterAttrs<'a> for &'a [Attribute] {
}
struct TokensOrDefault<'a, T: 'a>(&'a Option<T>);

impl<'a, T> ToTokens for TokensOrDefault<'a, T>
impl<T> ToTokens for TokensOrDefault<'_, T>
where
T: ToTokens + Default,
{
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# The intent is to keep this updated as new stable versions are relased.

[toolchain]
channel = "1.82.0"
channel = "1.83.0"
profile = "default"

0 comments on commit b604134

Please sign in to comment.