1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#![feature(do_not_recommend)] pub trait Foo { } impl Foo for i32 { } pub trait Bar { } #[do_not_recommend] impl<T: Foo> Bar for T { } fn stuff<T: Bar>(_: T) {} fn main() { stuff(1u8); //~^ the trait bound `u8: Foo` is not satisfied }