fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
916 B39 linesraw
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: std::fmt::Debug +  Sized>(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: std::fmt::Debug + Sized {
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() { }