1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Test sized-ness checking in substitution within fn bodies..
16 fn f1<X: ?Sized>(x: &X) {
18 //~^ ERROR the size for values of type
27 fn f3<X: ?Sized + T>(x: &X) {
29 //~^ ERROR the size for values of type
35 fn f6<X: ?Sized>(x: &X) {}
37 // Test with unsized struct.
42 fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
44 //~^ ERROR the size for values of type
49 fn f9<X: ?Sized>(x1: Box<S<X>>) {
51 //~^ ERROR the size for values of type
54 fn f10<X: ?Sized>(x1: Box<S<X>>) {
56 //~^ ERROR the size for values of type
57 //~| ERROR the size for values of type