Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rust to v1.71.0 #727

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dropshot/tests/fail/bad_endpoint10.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ error[E0277]: the trait bound `fn(RequestContext<()>) -> impl Future<Output = Re
note: required by a bound in `ApiEndpoint::<Context>::new`
--> src/api_description.rs
|
| pub fn new<HandlerType, FuncParams, ResponseType>(
| --- required by a bound in this associated function
...
| HandlerType: HttpHandlerFunc<Context, FuncParams, ResponseType>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::<Context>::new`
7 changes: 5 additions & 2 deletions dropshot/tests/fail/bad_endpoint15.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ error[E0277]: the trait bound `fn(RequestContext<()>) -> impl Future<Output = Re
note: required by a bound in `ApiEndpoint::<Context>::new`
--> src/api_description.rs
|
| pub fn new<HandlerType, FuncParams, ResponseType>(
| --- required by a bound in this associated function
...
| HandlerType: HttpHandlerFunc<Context, FuncParams, ResponseType>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::<Context>::new`

Expand All @@ -26,12 +29,12 @@ error: future cannot be sent between threads safely
|
= help: within `impl Future<Output = Result<HttpResponseOk<i32>, HttpError>>`, the trait `Send` is not implemented for `Rc<i32>`
note: future is not `Send` as this value is used across an await
--> tests/fail/bad_endpoint15.rs:21:49
--> tests/fail/bad_endpoint15.rs:21:50
|
20 | let non_send_type = Rc::new(0);
| ------------- has type `Rc<i32>` which is not `Send`
21 | tokio::time::sleep(Duration::from_millis(1)).await;
| ^^^^^^ await occurs here, with `non_send_type` maybe used later
| ^^^^^ await occurs here, with `non_send_type` maybe used later
22 | Ok(HttpResponseOk(*non_send_type))
23 | }
| - `non_send_type` is later dropped here
Expand Down
3 changes: 3 additions & 0 deletions dropshot/tests/fail/bad_endpoint17.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ error[E0277]: the trait bound `fn(RequestContext<()>, TypedBody<Stuff>, UntypedB
note: required by a bound in `ApiEndpoint::<Context>::new`
--> src/api_description.rs
|
| pub fn new<HandlerType, FuncParams, ResponseType>(
| --- required by a bound in this associated function
...
| HandlerType: HttpHandlerFunc<Context, FuncParams, ResponseType>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::<Context>::new`
3 changes: 3 additions & 0 deletions dropshot/tests/fail/bad_endpoint18.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ error[E0277]: the trait bound `fn(RequestContext<()>, TypedBody<Stuff>, dropshot
note: required by a bound in `ApiEndpoint::<Context>::new`
--> src/api_description.rs
|
| pub fn new<HandlerType, FuncParams, ResponseType>(
| --- required by a bound in this associated function
...
| HandlerType: HttpHandlerFunc<Context, FuncParams, ResponseType>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::<Context>::new`
3 changes: 3 additions & 0 deletions dropshot/tests/fail/bad_endpoint19.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ error[E0277]: the trait bound `fn(RequestContext<()>, std::string::String, drops
note: required by a bound in `ApiEndpoint::<Context>::new`
--> src/api_description.rs
|
| pub fn new<HandlerType, FuncParams, ResponseType>(
| --- required by a bound in this associated function
...
| HandlerType: HttpHandlerFunc<Context, FuncParams, ResponseType>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::<Context>::new`
2 changes: 1 addition & 1 deletion dropshot/tests/fail/bad_endpoint3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::sync::Arc;
}]
async fn bad_endpoint(
_rqctx: RequestContext<()>,
param: String,
_param: String,
) -> Result<HttpResponseOk<()>, HttpError> {
Ok(HttpResponseOk(()))
}
Expand Down
13 changes: 8 additions & 5 deletions dropshot/tests/fail/bad_endpoint3.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0277]: the trait bound `String: SharedExtractor` is not satisfied
--> tests/fail/bad_endpoint3.rs:18:12
--> tests/fail/bad_endpoint3.rs:18:13
|
18 | param: String,
| ^^^^^^ the trait `SharedExtractor` is not implemented for `String`
18 | _param: String,
| ^^^^^^ the trait `SharedExtractor` is not implemented for `String`
|
= help: the following other types implement trait `SharedExtractor`:
dropshot::Path<PathType>
Expand All @@ -17,8 +17,8 @@ note: required by a bound in `need_exclusive_extractor`
15 | | }]
| |__^ required by this bound in `need_exclusive_extractor`
...
18 | param: String,
| ------ required by a bound in this function
18 | _param: String,
| ------ required by a bound in this function
= note: this error originates in the attribute macro `endpoint` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `fn(RequestContext<()>, String) -> impl Future<Output = Result<HttpResponseOk<()>, HttpError>> {<impl From<bad_endpoint> for ApiEndpoint<<RequestContext<()> as RequestContextArgument>::Context>>::from::bad_endpoint}: dropshot::handler::HttpHandlerFunc<_, _, _>` is not satisfied
Expand All @@ -35,5 +35,8 @@ error[E0277]: the trait bound `fn(RequestContext<()>, String) -> impl Future<Out
note: required by a bound in `ApiEndpoint::<Context>::new`
--> src/api_description.rs
|
| pub fn new<HandlerType, FuncParams, ResponseType>(
| --- required by a bound in this associated function
...
| HandlerType: HttpHandlerFunc<Context, FuncParams, ResponseType>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ApiEndpoint::<Context>::new`
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.70.0"
channel = "1.71.0"
profile = "default"