]> git.lizzy.rs Git - rust.git/blob - src/test/ui/bound-suggestions.fixed
Rollup merge of #71829 - kper:issue71136, r=matthewjasper
[rust.git] / src / test / ui / bound-suggestions.fixed
1 // run-rustfix
2
3 #[allow(dead_code)]
4 fn test_impl(t: impl Sized + std::fmt::Debug) {
5     println!("{:?}", t);
6     //~^ ERROR doesn't implement
7 }
8
9 #[allow(dead_code)]
10 fn test_no_bounds<T: std::fmt::Debug>(t: T) {
11     println!("{:?}", t);
12     //~^ ERROR doesn't implement
13 }
14
15 #[allow(dead_code)]
16 fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
17     println!("{:?}", t);
18     //~^ ERROR doesn't implement
19 }
20
21 #[allow(dead_code)]
22 fn 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)]
28 fn 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)]
34 fn 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
39 pub fn main() { }