diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-04-05 13:22:13 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-05-23 18:51:47 +0200 |
| commit | e77096b08ccb276a938fafa7eadb87f9dac309d9 (patch) | |
| tree | 0d0fee8875309deb6f7287770ddfe88ad4dd10e3 | |
| parent | ae8975c812c5f31102f1f840322e10696b369aa7 (diff) | |
| download | rust-e77096b08ccb276a938fafa7eadb87f9dac309d9.tar.gz rust-e77096b08ccb276a938fafa7eadb87f9dac309d9.zip | |
Remove subtle Default impl for Value
| -rw-r--r-- | src/librustc/ty/query/values.rs | 6 | ||||
| -rw-r--r-- | src/test/incremental/cyclic-trait-hierarchy.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/cycle-projection-based-on-where-clause.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/cycle-projection-based-on-where-clause.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-20772.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-20772.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-21177.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-21177.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-23302-3.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-23302-3.stderr | 24 |
10 files changed, 9 insertions, 61 deletions
diff --git a/src/librustc/ty/query/values.rs b/src/librustc/ty/query/values.rs index 2fb318a47be..01d431b0ef0 100644 --- a/src/librustc/ty/query/values.rs +++ b/src/librustc/ty/query/values.rs @@ -14,12 +14,6 @@ impl<'tcx, T> Value<'tcx> for T { } } -impl<'tcx, T: Default> Value<'tcx> for T { - default fn from_cycle_error<'a>(_: TyCtxt<'a, 'tcx, 'tcx>) -> T { - T::default() - } -} - impl<'tcx> Value<'tcx> for Ty<'tcx> { fn from_cycle_error<'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Ty<'tcx> { tcx.types.err diff --git a/src/test/incremental/cyclic-trait-hierarchy.rs b/src/test/incremental/cyclic-trait-hierarchy.rs index 4102eb32580..27287d06d54 100644 --- a/src/test/incremental/cyclic-trait-hierarchy.rs +++ b/src/test/incremental/cyclic-trait-hierarchy.rs @@ -7,7 +7,6 @@ pub trait T2 { } #[cfg(cfail2)] pub trait T2: T1 { } //[cfail2]~^ ERROR cycle detected when computing the supertraits of `T2` -//[cfail2]~| ERROR cycle detected when computing the supertraits of `T2` pub trait T1: T2 { } diff --git a/src/test/ui/cycle-projection-based-on-where-clause.rs b/src/test/ui/cycle-projection-based-on-where-clause.rs index 336b67852cd..d3609acfdff 100644 --- a/src/test/ui/cycle-projection-based-on-where-clause.rs +++ b/src/test/ui/cycle-projection-based-on-where-clause.rs @@ -16,7 +16,6 @@ struct A<T> where T : Trait, T : Add<T::Item> //~^ ERROR cycle detected - //~| ERROR associated type `Item` not found for `T` { data: T } diff --git a/src/test/ui/cycle-projection-based-on-where-clause.stderr b/src/test/ui/cycle-projection-based-on-where-clause.stderr index e5a5e2897cd..59815138e2e 100644 --- a/src/test/ui/cycle-projection-based-on-where-clause.stderr +++ b/src/test/ui/cycle-projection-based-on-where-clause.stderr @@ -11,13 +11,6 @@ note: cycle used when processing `A` LL | T : Add<T::Item> | ^^^^^^^ -error[E0220]: associated type `Item` not found for `T` - --> $DIR/cycle-projection-based-on-where-clause.rs:17:19 - | -LL | T : Add<T::Item> - | ^^^^^^^ associated type `Item` not found - -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors have detailed explanations: E0220, E0391. -For more information about an error, try `rustc --explain E0220`. +For more information about this error, try `rustc --explain E0391`. diff --git a/src/test/ui/issues/issue-20772.rs b/src/test/ui/issues/issue-20772.rs index 36551e7014f..1500bc83152 100644 --- a/src/test/ui/issues/issue-20772.rs +++ b/src/test/ui/issues/issue-20772.rs @@ -1,6 +1,5 @@ trait T : Iterator<Item=Self::Item> //~^ ERROR cycle detected -//~| ERROR associated type `Item` not found for `Self` {} fn main() {} diff --git a/src/test/ui/issues/issue-20772.stderr b/src/test/ui/issues/issue-20772.stderr index 3b5dd975ce9..d64636310a3 100644 --- a/src/test/ui/issues/issue-20772.stderr +++ b/src/test/ui/issues/issue-20772.stderr @@ -3,7 +3,6 @@ error[E0391]: cycle detected when computing the supertraits of `T` | LL | / trait T : Iterator<Item=Self::Item> LL | | -LL | | LL | | {} | |__^ | @@ -13,17 +12,9 @@ note: cycle used when collecting item types in top-level module | LL | / trait T : Iterator<Item=Self::Item> LL | | -LL | | LL | | {} | |__^ -error[E0220]: associated type `Item` not found for `Self` - --> $DIR/issue-20772.rs:1:25 - | -LL | trait T : Iterator<Item=Self::Item> - | ^^^^^^^^^^ associated type `Item` not found - -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors have detailed explanations: E0220, E0391. -For more information about an error, try `rustc --explain E0220`. +For more information about this error, try `rustc --explain E0391`. diff --git a/src/test/ui/issues/issue-21177.rs b/src/test/ui/issues/issue-21177.rs index 9d153696b88..258e362d131 100644 --- a/src/test/ui/issues/issue-21177.rs +++ b/src/test/ui/issues/issue-21177.rs @@ -5,6 +5,5 @@ trait Trait { fn foo<T: Trait<A = T::B>>() { } //~^ ERROR cycle detected -//~| ERROR associated type `B` not found for `T` fn main() { } diff --git a/src/test/ui/issues/issue-21177.stderr b/src/test/ui/issues/issue-21177.stderr index 6841fe85dd7..00d9a3c46a7 100644 --- a/src/test/ui/issues/issue-21177.stderr +++ b/src/test/ui/issues/issue-21177.stderr @@ -11,13 +11,6 @@ note: cycle used when processing `foo` LL | fn foo<T: Trait<A = T::B>>() { } | ^^^^ -error[E0220]: associated type `B` not found for `T` - --> $DIR/issue-21177.rs:6:21 - | -LL | fn foo<T: Trait<A = T::B>>() { } - | ^^^^ associated type `B` not found - -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors have detailed explanations: E0220, E0391. -For more information about an error, try `rustc --explain E0220`. +For more information about this error, try `rustc --explain E0391`. diff --git a/src/test/ui/issues/issue-23302-3.rs b/src/test/ui/issues/issue-23302-3.rs index e17c5eea2a4..da75f330798 100644 --- a/src/test/ui/issues/issue-23302-3.rs +++ b/src/test/ui/issues/issue-23302-3.rs @@ -1,5 +1,4 @@ const A: i32 = B; //~ ERROR cycle detected -//~^ ERROR cycle detected const B: i32 = A; diff --git a/src/test/ui/issues/issue-23302-3.stderr b/src/test/ui/issues/issue-23302-3.stderr index 94624640809..a7d643987f7 100644 --- a/src/test/ui/issues/issue-23302-3.stderr +++ b/src/test/ui/issues/issue-23302-3.stderr @@ -10,36 +10,18 @@ note: ...which requires checking which parts of `A` are promotable to static... LL | const A: i32 = B; | ^ note: ...which requires const checking if rvalue is promotable to static `B`... - --> $DIR/issue-23302-3.rs:4:1 + --> $DIR/issue-23302-3.rs:3:1 | LL | const B: i32 = A; | ^^^^^^^^^^^^^^^^^ note: ...which requires checking which parts of `B` are promotable to static... - --> $DIR/issue-23302-3.rs:4:16 + --> $DIR/issue-23302-3.rs:3:16 | LL | const B: i32 = A; | ^ = note: ...which again requires const checking if rvalue is promotable to static `A`, completing the cycle = note: cycle used when running analysis passes on this crate -error[E0391]: cycle detected when processing `A` - --> $DIR/issue-23302-3.rs:1:16 - | -LL | const A: i32 = B; - | ^ - | -note: ...which requires processing `B`... - --> $DIR/issue-23302-3.rs:4:16 - | -LL | const B: i32 = A; - | ^ - = note: ...which again requires processing `A`, completing the cycle -note: cycle used when processing `A` - --> $DIR/issue-23302-3.rs:1:1 - | -LL | const A: i32 = B; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0391`. |
