]> git.proxmox.com Git - rustc.git/blame - tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
New upstream version 1.75.0+dfsg1
[rustc.git] / tests / ui / associated-type-bounds / return-type-notation / basic.without.stderr
CommitLineData
353b0b11
FG
1warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/basic.rs:5:12
3 |
ed00b5ec 4LL | #![feature(return_type_notation)]
353b0b11
FG
5 | ^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
8 = note: `#[warn(incomplete_features)]` on by default
9
353b0b11 10error: future cannot be sent between threads safely
49aad941 11 --> $DIR/basic.rs:23:13
353b0b11
FG
12 |
13LL | is_send(foo::<T>());
14 | ^^^^^^^^^^ future returned by `foo` is not `Send`
15 |
781aab86 16 = help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`
353b0b11 17note: future is not `Send` as it awaits another future which is not `Send`
49aad941 18 --> $DIR/basic.rs:13:5
353b0b11
FG
19 |
20LL | T::method().await?;
781aab86 21 | ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`, which is not `Send`
353b0b11 22note: required by a bound in `is_send`
49aad941 23 --> $DIR/basic.rs:17:20
353b0b11
FG
24 |
25LL | fn is_send(_: impl Send) {}
26 | ^^^^ required by this bound in `is_send`
27
49aad941 28error: aborting due to previous error; 1 warning emitted
353b0b11 29