5 // Rustfix should add this, or use `std::fmt::Debug` instead.
8 fn test_impl(t: impl Sized + std::fmt::Debug) {
10 //~^ ERROR doesn't implement
14 fn test_no_bounds<T: std::fmt::Debug>(t: T) {
16 //~^ ERROR doesn't implement
20 fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
22 //~^ ERROR doesn't implement
26 fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
27 println!("{:?} {:?}", x, y);
28 //~^ ERROR doesn't implement
32 fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
34 //~^ ERROR doesn't implement
38 fn test_many_bounds_where<X>(x: X) where X: Sized + std::fmt::Debug, X: Sized {
40 //~^ ERROR doesn't implement
44 const SIZE: usize = core::mem::size_of::<Self>();
45 //~^ ERROR the size for values of type `Self` cannot be known at compilation time
48 trait Bar: std::fmt::Display + Sized {
49 const SIZE: usize = core::mem::size_of::<Self>();
50 //~^ ERROR the size for values of type `Self` cannot be known at compilation time
53 trait Baz: Sized where Self: std::fmt::Display {
54 const SIZE: usize = core::mem::size_of::<Self>();
55 //~^ ERROR the size for values of type `Self` cannot be known at compilation time
58 trait Qux<T>: Sized where Self: std::fmt::Display {
59 const SIZE: usize = core::mem::size_of::<Self>();
60 //~^ ERROR the size for values of type `Self` cannot be known at compilation time
63 trait Bat<T>: std::fmt::Display + Sized {
64 const SIZE: usize = core::mem::size_of::<Self>();
65 //~^ ERROR the size for values of type `Self` cannot be known at compilation time