Skip to content

Commit a92e6aa

Browse files
committed
---
yaml --- r: 277647 b: refs/heads/try c: 5876b4b h: refs/heads/master i: 277645: 7cb9812 277643: 921cfd5 277639: 8d35627 277631: 2084a9a
1 parent 3b22583 commit a92e6aa

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 05f1a057b6e59fd07b4af7a9a2f0101d67faba88
4+
refs/heads/try: 5876b4b12aca5c614cf83218a1ca1fe10dde5422
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc/traits/error_reporting.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,10 @@ fn note_obligation_cause_code<'a, 'tcx, T>(infcx: &InferCtxt<'a, 'tcx>,
768768
err.fileline_note(
769769
cause_span,
770770
"tuple elements must have `Sized` type");
771+
772+
err.fileline_warn(
773+
cause_span,
774+
"this is a new restriction added in rustc 1.10");
771775
}
772776
ObligationCauseCode::ProjectionWf(data) => {
773777
err.note(&format!("required so that the projection `{}` is well-formed",

branches/try/src/test/compile-fail/unsized3.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
6060
fn f9<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
6161
f5(&(*x1, 34));
6262
//~^ ERROR `X: std::marker::Sized` is not satisfied
63-
//~^^ ERROR `X: std::marker::Sized` is not satisfied
63+
//~| WARNING this is a new restriction added in rustc 1.10
64+
//~^^^ ERROR `X: std::marker::Sized` is not satisfied
65+
//~| WARNING this is a new restriction added in rustc 1.10
6466
}
6567

6668
fn f10<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {

branches/try/src/test/compile-fail/unsized6.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ trait T {}
1515
fn f1<X: ?Sized>(x: &X) {
1616
let _: X; // <-- this is OK, no bindings created, no initializer.
1717
let _: (isize, (X, isize)); //~ERROR `X: std::marker::Sized` is not satisfied
18+
//~| WARNING this is a new restriction added in rustc 1.10
1819
let y: X; //~ERROR `X: std::marker::Sized` is not satisfied
1920
let y: (isize, (X, usize)); //~ERROR `X: std::marker::Sized` is not satisfied
21+
//~| WARNING this is a new restriction added in rustc 1.10
2022
}
2123
fn f2<X: ?Sized + T>(x: &X) {
2224
let y: X; //~ERROR `X: std::marker::Sized` is not satisfied
2325
let y: (isize, (X, isize)); //~ERROR `X: std::marker::Sized` is not satisfied
26+
//~| WARNING this is a new restriction added in rustc 1.10
2427
}
2528

2629
fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {

0 commit comments

Comments
 (0)