fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
838 B24 linesraw
1error[E0277]: the trait bound `Foo: Qux` is not satisfied in `impl std::future::Future`
2  --> $DIR/issue-64130-3-other.rs:23:5
3   |
4LL | fn is_qux<T: Qux>(t: T) { }
5   |    ------    --- required by this bound in `is_qux`
6...
7LL |     is_qux(bar());
8   |     ^^^^^^ within `impl std::future::Future`, the trait `Qux` is not implemented for `Foo`
9   |
10   = help: the following implementations were found:
11             <Foo as Qux>
12note: future does not implement `Qux` as this value is used across an await
13  --> $DIR/issue-64130-3-other.rs:17:5
14   |
15LL |     let x = Foo;
16   |         - has type `Foo`
17LL |     baz().await;
18   |     ^^^^^^^^^^^ await occurs here, with `x` maybe used later
19LL | }
20   | - `x` is later dropped here
21
22error: aborting due to previous error
23
24For more information about this error, try `rustc --explain E0277`.