rust/tests/ui/traits/next-solver/auto-with-drop_tracking_mir.fail.stderr
Esteban Küber 049c32797b On E0277, point at type that doesn't implement bound
When encountering an unmet trait bound, point at local type that doesn't implement the trait:

```
error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied
  --> $DIR/issue-64855.rs:9:19
   |
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
   |                   ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `Foo` is not implemented for `Bar<T>`
  --> $DIR/issue-64855.rs:9:1
   |
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
   | ^^^^^^^^^^^^^^^^^
```
2025-08-22 17:55:15 +00:00

26 lines
873 B
Text

error: future cannot be sent between threads safely
--> $DIR/auto-with-drop_tracking_mir.rs:25:13
|
LL | is_send(foo());
| ^^^^^ future returned by `foo` is not `Send`
|
help: the trait `Sync` is not implemented for `NotSync`
--> $DIR/auto-with-drop_tracking_mir.rs:8:1
|
LL | struct NotSync;
| ^^^^^^^^^^^^^^
note: future is not `Send` as this value is used across an await
--> $DIR/auto-with-drop_tracking_mir.rs:16:11
|
LL | let x = &NotSync;
| - has type `&NotSync` which is not `Send`
LL | bar().await;
| ^^^^^ await occurs here, with `x` maybe used later
note: required by a bound in `is_send`
--> $DIR/auto-with-drop_tracking_mir.rs:24:24
|
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
error: aborting due to 1 previous error