about summary refs log tree commit diff
path: root/tests/ui/coercion/invalid-blanket-coerce-unsized-impl.stderr
blob: 377906ee334a905ab35ce2f458a459a703c41eae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct<A>`)
  --> $DIR/invalid-blanket-coerce-unsized-impl.rs:7:6
   |
LL | impl<A> std::ops::CoerceUnsized<A> for A {}
   |      ^ type parameter `A` must be used as the type parameter for some local type
   |
   = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
   = note: only traits defined in the current crate can be implemented for a type parameter

error[E0377]: the trait `CoerceUnsized` may only be implemented for a coercion between structures
  --> $DIR/invalid-blanket-coerce-unsized-impl.rs:7:1
   |
LL | impl<A> std::ops::CoerceUnsized<A> for A {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0210, E0377.
For more information about an error, try `rustc --explain E0210`.