Closed
Description
trait Array: Sized {}
fn f<T: Array>(x: &T) {
let _ = x as &Array;
}
fn main() {}
<anon>:4:13: 4:14 error: cannot convert to a trait object because trait `Array` is not object-safe [E0038]
<anon>:4 let _ = x as &Array;
^
<anon>:4:13: 4:14 note: the trait cannot require that `Self : Sized`
<anon>:4 let _ = x as &Array;
^
<anon>:4:13: 4:14 note: the trait cannot require that `Self : Sized`
<anon>:4 let _ = x as &Array;
^
Preferably the note would only be printed once, otherwise it's just a bit confusing.