rust/tests/ui/suggestions/issue-96223.stderr
Esteban Küber 5b54286640 Remove detail from label/note that is already available in other note
Remove the "which is required by `{root_obligation}`" post-script in
"the trait `X` is not implemented for `Y`" explanation in E0277. This
information is already conveyed in the notes explaining requirements,
making it redundant while making the text (particularly in labels)
harder to read.

```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
  --> $DIR/wf-static-type.rs:10:13
   |
LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
   |             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`
   |
   = note: required for `Option<NotCopy>` to implement `Copy`
note: required by a bound in `IsCopy`
  --> $DIR/wf-static-type.rs:7:17
   |
LL | struct IsCopy<T:Copy> { t: T }
   |                 ^^^^ required by this bound in `IsCopy`
```
vs the prior

```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
  --> $DIR/wf-static-type.rs:10:13
   |
LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
   |             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy`
   |
   = note: required for `Option<NotCopy>` to implement `Copy`
note: required by a bound in `IsCopy`
  --> $DIR/wf-static-type.rs:7:17
   |
LL | struct IsCopy<T:Copy> { t: T }
   |                 ^^^^ required by this bound in `IsCopy`
```
2024-10-29 16:26:57 +00:00

32 lines
1.3 KiB
Plaintext

error[E0277]: the trait bound `for<'de> EmptyBis<'de>: Foo<'_>` is not satisfied
--> $DIR/issue-96223.rs:49:17
|
LL | icey_bounds(&p);
| ----------- ^^ the trait `for<'de> Foo<'_>` is not implemented for `EmptyBis<'de>`
| |
| required by a bound introduced by this call
|
= help: the trait `Foo<'de>` is implemented for `Baz<T>`
note: required for `Baz<EmptyBis<'de>>` to implement `for<'de> Foo<'de>`
--> $DIR/issue-96223.rs:16:14
|
LL | impl<'de, T> Foo<'de> for Baz<T> where T: Foo<'de> {}
| ^^^^^^^^ ^^^^^^ -------- unsatisfied trait bound introduced here
note: required for `Empty` to implement `Dummy<EmptyMarker>`
--> $DIR/issue-96223.rs:20:9
|
LL | impl<M> Dummy<M> for Empty
| ^^^^^^^^ ^^^^^
...
LL | for<'de> Baz<<M::Bar as Bar<'de>>::Inner>: Foo<'de>,
| -------- unsatisfied trait bound introduced here
note: required by a bound in `icey_bounds`
--> $DIR/issue-96223.rs:45:19
|
LL | fn icey_bounds<D: Dummy<EmptyMarker>>(p: &D) {}
| ^^^^^^^^^^^^^^^^^^ required by this bound in `icey_bounds`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.