]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/hr-associated-type-projection-1.stderr
Remove astconv usage in diagnostic
[rust.git] / tests / ui / associated-types / hr-associated-type-projection-1.stderr
1 error[E0271]: type mismatch resolving `<T as Deref>::Target == T`
2   --> $DIR/hr-associated-type-projection-1.rs:13:33
3    |
4 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T {
5    |      - this type parameter      ^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type
6    |
7    = note: expected type parameter `T`
8              found associated type `<T as Deref>::Target`
9 note: required by a bound in `UnsafeCopy`
10   --> $DIR/hr-associated-type-projection-1.rs:3:64
11    |
12 LL | trait UnsafeCopy<'a, T: Copy>
13    |       ---------- required by a bound in this
14 LL | where
15 LL |     for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>,
16    |                                                                ^^^^^^^^^^ required by this bound in `UnsafeCopy`
17 help: consider further restricting this bound
18    |
19 LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<'_, T> for T {
20    |                                +++++++++++++++++++
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0271`.