fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1// run-rustfix 2 3#[allow(dead_code)] 4fn test_impl(t: impl Sized + std::fmt::Debug) { 5 println!("{:?}", t); 6 //~^ ERROR doesn't implement 7} 8 9#[allow(dead_code)] 10fn test_no_bounds<T: std::fmt::Debug>(t: T) { 11 println!("{:?}", t); 12 //~^ ERROR doesn't implement 13} 14 15#[allow(dead_code)] 16fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) { 17 println!("{:?}", t); 18 //~^ ERROR doesn't implement 19} 20 21#[allow(dead_code)] 22fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug { 23 println!("{:?} {:?}", x, y); 24 //~^ ERROR doesn't implement 25} 26 27#[allow(dead_code)] 28fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug { 29 println!("{:?}", x); 30 //~^ ERROR doesn't implement 31} 32 33#[allow(dead_code)] 34fn test_many_bounds_where<X>(x: X) where X: Sized, X: Sized, X: std::fmt::Debug { 35 println!("{:?}", x); 36 //~^ ERROR doesn't implement 37} 38 39pub fn main() { }