err.fileline_note(
cause_span,
"tuple elements must have `Sized` type");
+
+ err.fileline_warn(
+ cause_span,
+ "this is a new restriction added in rustc 1.10");
}
ObligationCauseCode::ProjectionWf(data) => {
err.note(&format!("required so that the projection `{}` is well-formed",
fn f9<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
f5(&(*x1, 34));
//~^ ERROR `X: std::marker::Sized` is not satisfied
- //~^^ ERROR `X: std::marker::Sized` is not satisfied
+ //~| WARNING this is a new restriction added in rustc 1.10
+ //~^^^ ERROR `X: std::marker::Sized` is not satisfied
+ //~| WARNING this is a new restriction added in rustc 1.10
}
fn f10<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
fn f1<X: ?Sized>(x: &X) {
let _: X; // <-- this is OK, no bindings created, no initializer.
let _: (isize, (X, isize)); //~ERROR `X: std::marker::Sized` is not satisfied
+ //~| WARNING this is a new restriction added in rustc 1.10
let y: X; //~ERROR `X: std::marker::Sized` is not satisfied
let y: (isize, (X, usize)); //~ERROR `X: std::marker::Sized` is not satisfied
+ //~| WARNING this is a new restriction added in rustc 1.10
}
fn f2<X: ?Sized + T>(x: &X) {
let y: X; //~ERROR `X: std::marker::Sized` is not satisfied
let y: (isize, (X, isize)); //~ERROR `X: std::marker::Sized` is not satisfied
+ //~| WARNING this is a new restriction added in rustc 1.10
}
fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {