1 // Test `?Sized` local variables.
5 fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
6 let _: W; // <-- this is OK, no bindings created, no initializer.
7 let _: (isize, (X, isize));
8 //~^ ERROR the size for values of type
10 //~^ ERROR the size for values of type
11 let y: (isize, (Z, usize));
12 //~^ ERROR the size for values of type
14 fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
16 //~^ ERROR the size for values of type
17 let y: (isize, (Y, isize));
18 //~^ ERROR the size for values of type
21 fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
23 //~^ ERROR the size for values of type
25 //~^ ERROR the size for values of type
26 let (y, z) = (*x3, 4);
27 //~^ ERROR the size for values of type
29 fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
31 //~^ ERROR the size for values of type
33 //~^ ERROR the size for values of type
34 let (y, z) = (*x3, 4);
35 //~^ ERROR the size for values of type
38 fn g1<X: ?Sized>(x: X) {}
39 //~^ ERROR the size for values of type
40 fn g2<X: ?Sized + T>(x: X) {}
41 //~^ ERROR the size for values of type