diff options
| author | Ohad Ravid <ohad.rv@gmail.com> | 2019-10-26 17:28:02 +0200 |
|---|---|---|
| committer | Ohad Ravid <ohad.rv@gmail.com> | 2019-10-31 17:11:21 +0100 |
| commit | 026aee62ac04ae79059c902867bbf523afaa3583 (patch) | |
| tree | 40959a0610ee0178af4c0399517a3e92da67ffef /src | |
| parent | 92df638162b7ccea6f97a8e1287ed05c5c0818b4 (diff) | |
| download | rust-026aee62ac04ae79059c902867bbf523afaa3583.tar.gz rust-026aee62ac04ae79059c902867bbf523afaa3583.zip | |
Stabilize the `re_rebalance_coherence` feature
Diffstat (limited to 'src')
228 files changed, 257 insertions, 1625 deletions
diff --git a/src/doc/unstable-book/src/language-features/re-rebalance-coherence.md b/src/doc/unstable-book/src/language-features/re-rebalance-coherence.md deleted file mode 100644 index 1e74652a890..00000000000 --- a/src/doc/unstable-book/src/language-features/re-rebalance-coherence.md +++ /dev/null @@ -1,23 +0,0 @@ -# `re_rebalance_coherence` - -The tracking issue for this feature is: [#55437] - -[#55437]: https://github.com/rust-lang/rust/issues/55437 - ------------------------- - -The `re_rebalance_coherence` feature tweaks the rules regarding which trait -impls are allowed in crates. -The following rule is used: - -Given `impl<P1..=Pn> Trait<T1..=Tn> for T0`, an impl is valid only if at -least one of the following is true: -- `Trait` is a local trait -- All of - - At least one of the types `T0..=Tn` must be a local type. Let `Ti` be the - first such type. - - No uncovered type parameters `P1..=Pn` may appear in `T0..Ti` (excluding - `Ti`) - - -See the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/2451-re-rebalancing-coherence.md) for details. diff --git a/src/librustc/traits/coherence.rs b/src/librustc/traits/coherence.rs index 49a4d17d88d..1645f94535f 100644 --- a/src/librustc/traits/coherence.rs +++ b/src/librustc/traits/coherence.rs @@ -367,118 +367,52 @@ fn orphan_check_trait_ref<'tcx>( trait_ref); } - if tcx.features().re_rebalance_coherence { - // Given impl<P1..=Pn> Trait<T1..=Tn> for T0, an impl is valid only - // if at least one of the following is true: - // - // - Trait is a local trait - // (already checked in orphan_check prior to calling this function) - // - All of - // - At least one of the types T0..=Tn must be a local type. - // Let Ti be the first such type. - // - No uncovered type parameters P1..=Pn may appear in T0..Ti (excluding Ti) - // - fn uncover_fundamental_ty<'tcx>( - tcx: TyCtxt<'tcx>, - ty: Ty<'tcx>, - in_crate: InCrate, - ) -> Vec<Ty<'tcx>> { - if fundamental_ty(ty) && ty_is_non_local(tcx, ty, in_crate).is_some() { - ty.walk_shallow().flat_map(|ty| uncover_fundamental_ty(tcx, ty, in_crate)).collect() - } else { - vec![ty] - } + // Given impl<P1..=Pn> Trait<T1..=Tn> for T0, an impl is valid only + // if at least one of the following is true: + // + // - Trait is a local trait + // (already checked in orphan_check prior to calling this function) + // - All of + // - At least one of the types T0..=Tn must be a local type. + // Let Ti be the first such type. + // - No uncovered type parameters P1..=Pn may appear in T0..Ti (excluding Ti) + // + fn uncover_fundamental_ty<'tcx>( + tcx: TyCtxt<'tcx>, + ty: Ty<'tcx>, + in_crate: InCrate, + ) -> Vec<Ty<'tcx>> { + if fundamental_ty(ty) && ty_is_non_local(tcx, ty, in_crate).is_some() { + ty.walk_shallow().flat_map(|ty| uncover_fundamental_ty(tcx, ty, in_crate)).collect() + } else { + vec![ty] } + } - let mut non_local_spans = vec![]; - for (i, input_ty) in trait_ref - .input_types() - .flat_map(|ty| uncover_fundamental_ty(tcx, ty, in_crate)) - .enumerate() - { - debug!("orphan_check_trait_ref: check ty `{:?}`", input_ty); - let non_local_tys = ty_is_non_local(tcx, input_ty, in_crate); - if non_local_tys.is_none() { - debug!("orphan_check_trait_ref: ty_is_local `{:?}`", input_ty); - return Ok(()); - } else if let ty::Param(_) = input_ty.kind { - debug!("orphan_check_trait_ref: uncovered ty: `{:?}`", input_ty); - return Err(OrphanCheckErr::UncoveredTy(input_ty)) - } - if let Some(non_local_tys) = non_local_tys { - for input_ty in non_local_tys { - non_local_spans.push((input_ty, i == 0)); - } - } + let mut non_local_spans = vec![]; + for (i, input_ty) in trait_ref + .input_types() + .flat_map(|ty| uncover_fundamental_ty(tcx, ty, in_crate)) + .enumerate() + { + debug!("orphan_check_trait_ref: check ty `{:?}`", input_ty); + let non_local_tys = ty_is_non_local(tcx, input_ty, in_crate); + if non_local_tys.is_none() { + debug!("orphan_check_trait_ref: ty_is_local `{:?}`", input_ty); + return Ok(()); + } else if let ty::Param(_) = input_ty.kind { + debug!("orphan_check_trait_ref: uncovered ty: `{:?}`", input_ty); + return Err(OrphanCheckErr::UncoveredTy(input_ty)) } - // If we exit above loop, never found a local type. - debug!("orphan_check_trait_ref: no local type"); - Err(OrphanCheckErr::NonLocalInputType(non_local_spans)) - } else { - let mut non_local_spans = vec![]; - // First, create an ordered iterator over all the type - // parameters to the trait, with the self type appearing - // first. Find the first input type that either references a - // type parameter OR some local type. - for (i, input_ty) in trait_ref.input_types().enumerate() { - let non_local_tys = ty_is_non_local(tcx, input_ty, in_crate); - if non_local_tys.is_none() { - debug!("orphan_check_trait_ref: ty_is_local `{:?}`", input_ty); - - // First local input type. Check that there are no - // uncovered type parameters. - let uncovered_tys = uncovered_tys(tcx, input_ty, in_crate); - for uncovered_ty in uncovered_tys { - if let Some(param) = uncovered_ty.walk() - .find(|t| is_possibly_remote_type(t, in_crate)) - { - debug!("orphan_check_trait_ref: uncovered type `{:?}`", param); - return Err(OrphanCheckErr::UncoveredTy(param)); - } - } - - // OK, found local type, all prior types upheld invariant. - return Ok(()); - } - - // Otherwise, enforce invariant that there are no type - // parameters reachable. - if let Some(param) = input_ty.walk() - .find(|t| is_possibly_remote_type(t, in_crate)) - { - debug!("orphan_check_trait_ref: uncovered type `{:?}`", param); - return Err(OrphanCheckErr::UncoveredTy(param)); - } - - if let Some(non_local_tys) = non_local_tys { - for input_ty in non_local_tys { - non_local_spans.push((input_ty, i == 0)); - } + if let Some(non_local_tys) = non_local_tys { + for input_ty in non_local_tys { + non_local_spans.push((input_ty, i == 0)); } } - // If we exit above loop, never found a local type. - debug!("orphan_check_trait_ref: no local type"); - Err(OrphanCheckErr::NonLocalInputType(non_local_spans)) - } -} - -fn uncovered_tys<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, in_crate: InCrate) -> Vec<Ty<'tcx>> { - if ty_is_non_local_constructor(tcx, ty, in_crate).is_none() { - vec![] - } else if fundamental_ty(ty) { - ty.walk_shallow() - .flat_map(|t| uncovered_tys(tcx, t, in_crate)) - .collect() - } else { - vec![ty] - } -} - -fn is_possibly_remote_type(ty: Ty<'_>, _in_crate: InCrate) -> bool { - match ty.kind { - ty::Projection(..) | ty::Param(..) => true, - _ => false, } + // If we exit above loop, never found a local type. + debug!("orphan_check_trait_ref: no local type"); + Err(OrphanCheckErr::NonLocalInputType(non_local_spans)) } fn ty_is_non_local<'t>(tcx: TyCtxt<'t>, ty: Ty<'t>, in_crate: InCrate) -> Option<Vec<Ty<'t>>> { diff --git a/src/libsyntax/feature_gate/accepted.rs b/src/libsyntax/feature_gate/accepted.rs index a1cf2d42108..ed4b421d9db 100644 --- a/src/libsyntax/feature_gate/accepted.rs +++ b/src/libsyntax/feature_gate/accepted.rs @@ -253,6 +253,9 @@ declare_features! ( (accepted, const_constructor, "1.40.0", Some(61456), None), /// Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests. (accepted, cfg_doctest, "1.40.0", Some(62210), None), + /// Allows relaxing the coherence rules such that + /// `impl<T> ForeignTrait<LocalType> for ForeignType<T>` is permitted. + (accepted, re_rebalance_coherence, "1.40.0", Some(55437), None), // ------------------------------------------------------------------------- // feature-group-end: accepted features diff --git a/src/libsyntax/feature_gate/active.rs b/src/libsyntax/feature_gate/active.rs index 736a363bbfc..bde776e71cf 100644 --- a/src/libsyntax/feature_gate/active.rs +++ b/src/libsyntax/feature_gate/active.rs @@ -469,10 +469,6 @@ declare_features! ( /// Allows exhaustive integer pattern matching on `usize` and `isize`. (active, precise_pointer_size_matching, "1.32.0", Some(56354), None), - /// Allows relaxing the coherence rules such that - /// `impl<T> ForeignTrait<LocalType> for ForeignType<T>` is permitted. - (active, re_rebalance_coherence, "1.32.0", Some(55437), None), - /// Allows using `#[ffi_returns_twice]` on foreign functions. (active, ffi_returns_twice, "1.34.0", Some(58314), None), diff --git a/src/test/ui/coherence/coherence-all-remote.re.stderr b/src/test/ui/coherence/coherence-all-remote.re.stderr deleted file mode 100644 index 0541db2b850..00000000000 --- a/src/test/ui/coherence/coherence-all-remote.re.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-all-remote.rs:9:6 - | -LL | impl<T> Remote1<T> for isize { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-all-remote.rs b/src/test/ui/coherence/coherence-all-remote.rs index 68c924ee274..5c3bfee822f 100644 --- a/src/test/ui/coherence/coherence-all-remote.rs +++ b/src/test/ui/coherence/coherence-all-remote.rs @@ -1,13 +1,9 @@ // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; use lib::Remote1; impl<T> Remote1<T> for isize { } -//[old]~^ ERROR E0210 -//[re]~^^ ERROR E0210 +//~^ ERROR E0210 fn main() { } diff --git a/src/test/ui/coherence/coherence-all-remote.old.stderr b/src/test/ui/coherence/coherence-all-remote.stderr index 0541db2b850..b35ae46f888 100644 --- a/src/test/ui/coherence/coherence-all-remote.old.stderr +++ b/src/test/ui/coherence/coherence-all-remote.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-all-remote.rs:9:6 + --> $DIR/coherence-all-remote.rs:6:6 | LL | impl<T> Remote1<T> for isize { } | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/coherence-bigint-int.rs b/src/test/ui/coherence/coherence-bigint-int.rs index 0c9abdc15e6..02945e9dade 100644 --- a/src/test/ui/coherence/coherence-bigint-int.rs +++ b/src/test/ui/coherence/coherence-bigint-int.rs @@ -1,8 +1,5 @@ // run-pass // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/coherence/coherence-bigint-param.old.stderr b/src/test/ui/coherence/coherence-bigint-param.old.stderr deleted file mode 100644 index 816ad949a2b..00000000000 --- a/src/test/ui/coherence/coherence-bigint-param.old.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-bigint-param.rs:11:6 - | -LL | impl<T> Remote1<BigInt> for T { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-bigint-param.rs b/src/test/ui/coherence/coherence-bigint-param.rs index 24106b4b348..c6543aaf67d 100644 --- a/src/test/ui/coherence/coherence-bigint-param.rs +++ b/src/test/ui/coherence/coherence-bigint-param.rs @@ -1,7 +1,4 @@ // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; use lib::Remote1; @@ -9,7 +6,6 @@ use lib::Remote1; pub struct BigInt; impl<T> Remote1<BigInt> for T { } -//[old]~^ ERROR type parameter `T` must be used as the type parameter for some local type -//[re]~^^ ERROR E0210 +//~^ ERROR E0210 fn main() { } diff --git a/src/test/ui/coherence/coherence-bigint-param.re.stderr b/src/test/ui/coherence/coherence-bigint-param.stderr index 816ad949a2b..bb81d7adea2 100644 --- a/src/test/ui/coherence/coherence-bigint-param.re.stderr +++ b/src/test/ui/coherence/coherence-bigint-param.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-bigint-param.rs:11:6 + --> $DIR/coherence-bigint-param.rs:8:6 | LL | impl<T> Remote1<BigInt> for T { } | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/coherence-bigint-vecint.rs b/src/test/ui/coherence/coherence-bigint-vecint.rs index 38e0be0aa9a..a5dba90be5c 100644 --- a/src/test/ui/coherence/coherence-bigint-vecint.rs +++ b/src/test/ui/coherence/coherence-bigint-vecint.rs @@ -1,8 +1,5 @@ // run-pass // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.re.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.re.stderr deleted file mode 100644 index a6d29048b4d..00000000000 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait`: - --> $DIR/coherence-blanket-conflicts-with-blanket-implemented.rs:28:1 - | -LL | impl<T:Even> MyTrait for T { - | -------------------------- first implementation here -... -LL | impl<T:Odd> MyTrait for T { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.rs b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.rs index 098a13e54bf..93a4bc5fe78 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.rs +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.rs @@ -1,7 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::fmt::Debug; use std::default::Default; @@ -26,8 +22,7 @@ impl<T:Even> MyTrait for T { } impl<T:Odd> MyTrait for T { -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn get(&self) -> usize { 0 } } diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.old.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr index a6d29048b4d..e95826ed4d5 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.old.stderr +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait`: - --> $DIR/coherence-blanket-conflicts-with-blanket-implemented.rs:28:1 + --> $DIR/coherence-blanket-conflicts-with-blanket-implemented.rs:24:1 | LL | impl<T:Even> MyTrait for T { | -------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.re.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.re.stderr deleted file mode 100644 index 1f3ddd1dc42..00000000000 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait`: - --> $DIR/coherence-blanket-conflicts-with-blanket-unimplemented.rs:24:1 - | -LL | impl<T:Even> MyTrait for T { - | -------------------------- first implementation here -... -LL | impl<T:Odd> MyTrait for T { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.rs b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.rs index 5b76fc0174b..950a08ff224 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.rs +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.rs @@ -1,7 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::fmt::Debug; use std::default::Default; @@ -22,8 +18,7 @@ impl<T:Even> MyTrait for T { } impl<T:Odd> MyTrait for T { -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn get(&self) -> usize { 0 } } diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.old.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr index 1f3ddd1dc42..ea9838b4520 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.old.stderr +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait`: - --> $DIR/coherence-blanket-conflicts-with-blanket-unimplemented.rs:24:1 + --> $DIR/coherence-blanket-conflicts-with-blanket-unimplemented.rs:20:1 | LL | impl<T:Even> MyTrait for T { | -------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.re.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.re.stderr deleted file mode 100644 index 298ac6d1f21..00000000000 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.re.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0119]: conflicting implementations of trait `go_trait::GoMut` for type `MyThingy`: - --> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:18:1 - | -LL | impl GoMut for MyThingy { - | ^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: conflicting implementation in crate `go_trait`: - - impl<G> go_trait::GoMut for G - where G: go_trait::Go; - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs index b0aaf57e2a9..bccbac2ff16 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.rs @@ -1,7 +1,4 @@ // aux-build:go_trait.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate go_trait; @@ -16,8 +13,7 @@ impl Go for MyThingy { } impl GoMut for MyThingy { -//[old]~^ ERROR conflicting implementations -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn go_mut(&mut self, arg: isize) { } } diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.old.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr index 298ac6d1f21..91cf925e680 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.old.stderr +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `go_trait::GoMut` for type `MyThingy`: - --> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:18:1 + --> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:15:1 | LL | impl GoMut for MyThingy { | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.re.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.re.stderr deleted file mode 100644 index 94bbbdbe0a4..00000000000 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait<MyType>` for type `MyType`: - --> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:26:1 - | -LL | impl<T> MyTrait<T> for T { - | ------------------------ first implementation here -... -LL | impl MyTrait<MyType> for MyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.rs b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.rs index 9192d123514..6a9db217373 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.rs +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.rs @@ -1,7 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::fmt::Debug; use std::default::Default; @@ -24,8 +20,7 @@ struct MyType { } impl MyTrait<MyType> for MyType { -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn get(&self) -> usize { (*self).clone() } } diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.old.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr index 94bbbdbe0a4..af4f4d09d7a 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.old.stderr +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait<MyType>` for type `MyType`: - --> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:26:1 + --> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:22:1 | LL | impl<T> MyTrait<T> for T { | ------------------------ first implementation here diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.re.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.re.stderr deleted file mode 100644 index cf799c20cb4..00000000000 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`: - --> $DIR/coherence-blanket-conflicts-with-specific-trait.rs:24:1 - | -LL | impl<T:OtherTrait> MyTrait for T { - | -------------------------------- first implementation here -... -LL | impl MyTrait for MyType { - | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.rs b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.rs index 51cb10e6185..02f9217da68 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.rs +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.rs @@ -1,10 +1,6 @@ // Test that a blank impl for all T:PartialEq conflicts with an impl for some // specific T when T:PartialEq. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - trait OtherTrait { fn noop(&self); } @@ -22,8 +18,7 @@ struct MyType { } impl MyTrait for MyType { -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn get(&self) -> usize { self.dummy } } diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.old.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr index cf799c20cb4..6922f3ebffa 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.old.stderr +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`: - --> $DIR/coherence-blanket-conflicts-with-specific-trait.rs:24:1 + --> $DIR/coherence-blanket-conflicts-with-specific-trait.rs:20:1 | LL | impl<T:OtherTrait> MyTrait for T { | -------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.re.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.re.stderr deleted file mode 100644 index 0807b11a434..00000000000 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`: - --> $DIR/coherence-blanket-conflicts-with-specific.rs:23:1 - | -LL | impl<T> MyTrait for T { - | --------------------- first implementation here -... -LL | impl MyTrait for MyType { - | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.rs b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.rs index 3ecb613188a..5a562ff6ab9 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.rs +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.rs @@ -1,7 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::fmt::Debug; use std::default::Default; @@ -21,8 +17,7 @@ struct MyType { } impl MyTrait for MyType { -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn get(&self) -> usize { self.dummy } } diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.old.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.stderr index 0807b11a434..4bc28276479 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.old.stderr +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`: - --> $DIR/coherence-blanket-conflicts-with-specific.rs:23:1 + --> $DIR/coherence-blanket-conflicts-with-specific.rs:19:1 | LL | impl<T> MyTrait for T { | --------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-blanket.rs b/src/test/ui/coherence/coherence-blanket.rs index 5d310cc2c6a..55fa89d7507 100644 --- a/src/test/ui/coherence/coherence-blanket.rs +++ b/src/test/ui/coherence/coherence-blanket.rs @@ -1,9 +1,6 @@ // run-pass #![allow(unused_imports)] // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.old.stderr b/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.old.stderr deleted file mode 100644 index bb3641f2247..00000000000 --- a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.old.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<_>`: - --> $DIR/coherence-conflicting-negative-trait-impl.rs:13:1 - | -LL | unsafe impl<T: MyTrait+'static> Send for TestType<T> {} - | ---------------------------------------------------- first implementation here -LL | -LL | impl<T: MyTrait> !Send for TestType<T> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>` - -error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<i32>`: - --> $DIR/coherence-conflicting-negative-trait-impl.rs:19:1 - | -LL | unsafe impl<T:'static> Send for TestType<T> {} - | ------------------------------------------- first implementation here -LL | -LL | impl !Send for TestType<i32> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<i32>` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.rs b/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.rs index e05fecb11ed..66d0958e4c9 100644 --- a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.rs +++ b/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.rs @@ -1,6 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(optin_builtin_traits)] #![feature(overlapping_marker_traits)] @@ -11,13 +8,11 @@ struct TestType<T>(::std::marker::PhantomData<T>); unsafe impl<T: MyTrait+'static> Send for TestType<T> {} impl<T: MyTrait> !Send for TestType<T> {} -//[old]~^ ERROR conflicting implementations of trait `std::marker::Send` -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 unsafe impl<T:'static> Send for TestType<T> {} impl !Send for TestType<i32> {} -//[old]~^ ERROR conflicting implementations of trait `std::marker::Send` -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() {} diff --git a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.re.stderr b/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr index bb3641f2247..0a8bbc4bc50 100644 --- a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.re.stderr +++ b/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<_>`: - --> $DIR/coherence-conflicting-negative-trait-impl.rs:13:1 + --> $DIR/coherence-conflicting-negative-trait-impl.rs:10:1 | LL | unsafe impl<T: MyTrait+'static> Send for TestType<T> {} | ---------------------------------------------------- first implementation here @@ -8,7 +8,7 @@ LL | impl<T: MyTrait> !Send for TestType<T> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>` error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<i32>`: - --> $DIR/coherence-conflicting-negative-trait-impl.rs:19:1 + --> $DIR/coherence-conflicting-negative-trait-impl.rs:15:1 | LL | unsafe impl<T:'static> Send for TestType<T> {} | ------------------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-covered-type-parameter.rs b/src/test/ui/coherence/coherence-covered-type-parameter.rs index 1cf039f0831..bb95c59d183 100644 --- a/src/test/ui/coherence/coherence-covered-type-parameter.rs +++ b/src/test/ui/coherence/coherence-covered-type-parameter.rs @@ -1,9 +1,6 @@ // run-pass #![allow(dead_code)] // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/coherence/coherence-cow.a.stderr b/src/test/ui/coherence/coherence-cow.a.stderr deleted file mode 100644 index d3f8ba63f07..00000000000 --- a/src/test/ui/coherence/coherence-cow.a.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-cow.rs:18:6 - | -LL | impl<T> Remote for Pair<T,Cover<T>> { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-cow.b.stderr b/src/test/ui/coherence/coherence-cow.b.stderr deleted file mode 100644 index d8db025cbcf..00000000000 --- a/src/test/ui/coherence/coherence-cow.b.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-cow.rs:23:6 - | -LL | impl<T> Remote for Pair<Cover<T>,T> { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-cow.c.stderr b/src/test/ui/coherence/coherence-cow.c.stderr deleted file mode 100644 index ff46d7ea280..00000000000 --- a/src/test/ui/coherence/coherence-cow.c.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-cow.rs:28:6 - | -LL | impl<T,U> Remote for Pair<Cover<T>,U> { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-cow.re_b.stderr b/src/test/ui/coherence/coherence-cow.re_b.stderr index 146232ac02b..39f211eff36 100644 --- a/src/test/ui/coherence/coherence-cow.re_b.stderr +++ b/src/test/ui/coherence/coherence-cow.re_b.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-cow.rs:23:1 + --> $DIR/coherence-cow.rs:22:1 | LL | impl<T> Remote for Pair<Cover<T>,T> { } | ^^^^^^^^^^^^^^^^^^^---------------- diff --git a/src/test/ui/coherence/coherence-cow.re_c.stderr b/src/test/ui/coherence/coherence-cow.re_c.stderr index e0cf6aab7bb..94bb0d2166c 100644 --- a/src/test/ui/coherence/coherence-cow.re_c.stderr +++ b/src/test/ui/coherence/coherence-cow.re_c.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-cow.rs:28:1 + --> $DIR/coherence-cow.rs:26:1 | LL | impl<T,U> Remote for Pair<Cover<T>,U> { } | ^^^^^^^^^^^^^^^^^^^^^---------------- diff --git a/src/test/ui/coherence/coherence-cow.rs b/src/test/ui/coherence/coherence-cow.rs index 956b0734148..86a8d0963b8 100644 --- a/src/test/ui/coherence/coherence-cow.rs +++ b/src/test/ui/coherence/coherence-cow.rs @@ -1,6 +1,6 @@ -// revisions: a b c re_a re_b re_c +// revisions: re_a re_b re_c -#![cfg_attr(any(re_a, re_b, re_c), feature(re_rebalance_coherence))] +#![cfg_attr(any(), re_a, re_b, re_c)] // aux-build:coherence_lib.rs @@ -14,19 +14,16 @@ use lib::{Remote,Pair}; pub struct Cover<T>(T); -#[cfg(any(a, re_a))] +#[cfg(any(re_a))] impl<T> Remote for Pair<T,Cover<T>> { } -//[a]~^ ERROR E0210 -//[re_a]~^^ ERROR E0117 +//[re_a]~^ ERROR E0117 -#[cfg(any(b, re_b))] +#[cfg(any(re_b))] impl<T> Remote for Pair<Cover<T>,T> { } -//[b]~^ ERROR E0210 -//[re_b]~^^ ERROR E0117 +//[re_b]~^ ERROR E0117 -#[cfg(any(c, re_c))] +#[cfg(any(re_c))] impl<T,U> Remote for Pair<Cover<T>,U> { } -//[c]~^ ERROR type parameter `T` must be used as the type parameter for some local type -//[re_c]~^^ ERROR E0117 +//[re_c]~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr deleted file mode 100644 index 971abe29639..00000000000 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0119]: conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`: - --> $DIR/coherence-cross-crate-conflict.rs:12:1 - | -LL | impl<A> Foo for A { - | ^^^^^^^^^^^^^^^^^ - | - = note: conflicting implementation in crate `trait_impl_conflict`: - - impl trait_impl_conflict::Foo for isize; - -error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct<A>`) - --> $DIR/coherence-cross-crate-conflict.rs:12:6 - | -LL | impl<A> Foo for A { - | ^ type parameter `A` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0119, E0210. -For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.rs b/src/test/ui/coherence/coherence-cross-crate-conflict.rs index 9643ab643df..648e290a4b8 100644 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.rs +++ b/src/test/ui/coherence/coherence-cross-crate-conflict.rs @@ -2,18 +2,13 @@ // generalizes the one upstream // aux-build:trait_impl_conflict.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate trait_impl_conflict; use trait_impl_conflict::Foo; impl<A> Foo for A { - //[old]~^ ERROR type parameter `A` must be used as the type parameter for some local type - //[old]~| ERROR conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize` - //[re]~^^^ ERROR E0119 - //[re]~| ERROR E0210 + //~^ ERROR E0119 + //~| ERROR E0210 } fn main() { diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr index 971abe29639..cb66f9b0c7f 100644 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr +++ b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`: - --> $DIR/coherence-cross-crate-conflict.rs:12:1 + --> $DIR/coherence-cross-crate-conflict.rs:9:1 | LL | impl<A> Foo for A { | ^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | impl<A> Foo for A { - impl trait_impl_conflict::Foo for isize; error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct<A>`) - --> $DIR/coherence-cross-crate-conflict.rs:12:6 + --> $DIR/coherence-cross-crate-conflict.rs:9:6 | LL | impl<A> Foo for A { | ^ type parameter `A` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/coherence-default-trait-impl.re.stderr b/src/test/ui/coherence/coherence-default-trait-impl.re.stderr deleted file mode 100644 index 3f644e3a6e7..00000000000 --- a/src/test/ui/coherence/coherence-default-trait-impl.re.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0199]: implementing the trait `MySafeTrait` is not unsafe - --> $DIR/coherence-default-trait-impl.rs:10:1 - | -LL | unsafe impl MySafeTrait for Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0200]: the trait `MyUnsafeTrait` requires an `unsafe impl` declaration - --> $DIR/coherence-default-trait-impl.rs:16:1 - | -LL | impl MyUnsafeTrait for Foo {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0199, E0200. -For more information about an error, try `rustc --explain E0199`. diff --git a/src/test/ui/coherence/coherence-default-trait-impl.rs b/src/test/ui/coherence/coherence-default-trait-impl.rs index 606b4947b5f..db24662e2d5 100644 --- a/src/test/ui/coherence/coherence-default-trait-impl.rs +++ b/src/test/ui/coherence/coherence-default-trait-impl.rs @@ -1,6 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(optin_builtin_traits)] auto trait MySafeTrait {} @@ -8,13 +5,11 @@ auto trait MySafeTrait {} struct Foo; unsafe impl MySafeTrait for Foo {} -//[old]~^ ERROR implementing the trait `MySafeTrait` is not unsafe -//[re]~^^ ERROR E0199 +//~^ ERROR E0199 unsafe auto trait MyUnsafeTrait {} impl MyUnsafeTrait for Foo {} -//[old]~^ ERROR the trait `MyUnsafeTrait` requires an `unsafe impl` declaration -//[re]~^^ ERROR E0200 +//~^ ERROR E0200 fn main() {} diff --git a/src/test/ui/coherence/coherence-default-trait-impl.old.stderr b/src/test/ui/coherence/coherence-default-trait-impl.stderr index 3f644e3a6e7..f6a163268a1 100644 --- a/src/test/ui/coherence/coherence-default-trait-impl.old.stderr +++ b/src/test/ui/coherence/coherence-default-trait-impl.stderr @@ -1,11 +1,11 @@ error[E0199]: implementing the trait `MySafeTrait` is not unsafe - --> $DIR/coherence-default-trait-impl.rs:10:1 + --> $DIR/coherence-default-trait-impl.rs:7:1 | LL | unsafe impl MySafeTrait for Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0200]: the trait `MyUnsafeTrait` requires an `unsafe impl` declaration - --> $DIR/coherence-default-trait-impl.rs:16:1 + --> $DIR/coherence-default-trait-impl.rs:12:1 | LL | impl MyUnsafeTrait for Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/coherence/coherence-error-suppression.re.stderr b/src/test/ui/coherence/coherence-error-suppression.re.stderr deleted file mode 100644 index b81f7553317..00000000000 --- a/src/test/ui/coherence/coherence-error-suppression.re.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0412]: cannot find type `DoesNotExist` in this scope - --> $DIR/coherence-error-suppression.rs:13:14 - | -LL | impl Foo for DoesNotExist {} - | ^^^^^^^^^^^^ not found in this scope - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0412`. diff --git a/src/test/ui/coherence/coherence-error-suppression.rs b/src/test/ui/coherence/coherence-error-suppression.rs index 60b88fb80e4..909214c1b6e 100644 --- a/src/test/ui/coherence/coherence-error-suppression.rs +++ b/src/test/ui/coherence/coherence-error-suppression.rs @@ -1,9 +1,5 @@ // check that error types in coherence do not cause error cascades. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - trait Foo {} impl Foo for i8 {} @@ -11,8 +7,7 @@ impl Foo for i16 {} impl Foo for i32 {} impl Foo for i64 {} impl Foo for DoesNotExist {} -//[old]~^ ERROR cannot find type `DoesNotExist` in this scope -//[re]~^^ ERROR E0412 +//~^ ERROR E0412 impl Foo for u8 {} impl Foo for u16 {} impl Foo for u32 {} diff --git a/src/test/ui/coherence/coherence-error-suppression.old.stderr b/src/test/ui/coherence/coherence-error-suppression.stderr index b81f7553317..aadc80cb1c3 100644 --- a/src/test/ui/coherence/coherence-error-suppression.old.stderr +++ b/src/test/ui/coherence/coherence-error-suppression.stderr @@ -1,5 +1,5 @@ error[E0412]: cannot find type `DoesNotExist` in this scope - --> $DIR/coherence-error-suppression.rs:13:14 + --> $DIR/coherence-error-suppression.rs:9:14 | LL | impl Foo for DoesNotExist {} | ^^^^^^^^^^^^ not found in this scope diff --git a/src/test/ui/coherence/coherence-fundamental-trait-objects.re.stderr b/src/test/ui/coherence/coherence-fundamental-trait-objects.re.stderr deleted file mode 100644 index a3da52fe484..00000000000 --- a/src/test/ui/coherence/coherence-fundamental-trait-objects.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-fundamental-trait-objects.rs:15:1 - | -LL | impl Misc for dyn Fundamental<Local> {} - | ^^^^^^^^^^^^^^---------------------- - | | | - | | `dyn coherence_fundamental_trait_lib::Fundamental<Local>` is not defined in the current crate - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-fundamental-trait-objects.rs b/src/test/ui/coherence/coherence-fundamental-trait-objects.rs index 0c7d54425dd..dd127bf7f4b 100644 --- a/src/test/ui/coherence/coherence-fundamental-trait-objects.rs +++ b/src/test/ui/coherence/coherence-fundamental-trait-objects.rs @@ -3,9 +3,6 @@ // are distinct. // aux-build:coherence_fundamental_trait_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_fundamental_trait_lib; @@ -13,7 +10,6 @@ use coherence_fundamental_trait_lib::{Fundamental, Misc}; pub struct Local; impl Misc for dyn Fundamental<Local> {} -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() {} diff --git a/src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr b/src/test/ui/coherence/coherence-fundamental-trait-objects.stderr index a3da52fe484..06cfdeb3907 100644 --- a/src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr +++ b/src/test/ui/coherence/coherence-fundamental-trait-objects.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-fundamental-trait-objects.rs:15:1 + --> $DIR/coherence-fundamental-trait-objects.rs:12:1 | LL | impl Misc for dyn Fundamental<Local> {} | ^^^^^^^^^^^^^^---------------------- diff --git a/src/test/ui/coherence/coherence-impl-in-fn.rs b/src/test/ui/coherence/coherence-impl-in-fn.rs index 09e2c1e5a4e..b9719731748 100644 --- a/src/test/ui/coherence/coherence-impl-in-fn.rs +++ b/src/test/ui/coherence/coherence-impl-in-fn.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] #![allow(non_camel_case_types)] diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr deleted file mode 100644 index 18a7cea95bd..00000000000 --- a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.re.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0038]: the trait `NotObjectSafe` cannot be made into an object - --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:11:6 - | -LL | trait NotObjectSafe { fn eq(&self, other: Self); } - | -- method `eq` references the `Self` type in its parameters or return type -LL | impl NotObjectSafe for dyn NotObjectSafe { } - | ^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0038`. diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs index b4c88e93783..20ff875491f 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs +++ b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs @@ -1,15 +1,10 @@ // Test that we give suitable error messages when the user attempts to // impl a trait `Trait` for its own object type. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - // If the trait is not object-safe, we give a more tailored message // because we're such schnuckels: trait NotObjectSafe { fn eq(&self, other: Self); } impl NotObjectSafe for dyn NotObjectSafe { } -//[old]~^ ERROR E0038 -//[re]~^^ ERROR E0038 +//~^ ERROR E0038 fn main() { } diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr index 18a7cea95bd..ed6be60de46 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `NotObjectSafe` cannot be made into an object - --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:11:6 + --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:7:6 | LL | trait NotObjectSafe { fn eq(&self, other: Self); } | -- method `eq` references the `Self` type in its parameters or return type diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr deleted file mode 100644 index 4819ce9260e..00000000000 --- a/src/test/ui/coherence/coherence-impl-trait-for-trait.re.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Foo` - --> $DIR/coherence-impl-trait-for-trait.rs:13:1 - | -LL | impl Foo for dyn Baz { } - | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo` - -error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Bar` - --> $DIR/coherence-impl-trait-for-trait.rs:16:1 - | -LL | impl Bar for dyn Baz { } - | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar` - -error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Baz` - --> $DIR/coherence-impl-trait-for-trait.rs:19:1 - | -LL | impl Baz for dyn Baz { } - | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz` - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0371`. diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait.rs b/src/test/ui/coherence/coherence-impl-trait-for-trait.rs index 3ce3dca0660..195a37f15a4 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-trait.rs +++ b/src/test/ui/coherence/coherence-impl-trait-for-trait.rs @@ -1,24 +1,17 @@ // Test that we give suitable error messages when the user attempts to // impl a trait `Trait` for its own object type. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - trait Foo { fn dummy(&self) { } } trait Bar: Foo { } trait Baz: Bar { } // Supertraits of Baz are not legal: impl Foo for dyn Baz { } -//[old]~^ ERROR E0371 -//[re]~^^ ERROR E0371 +//~^ ERROR E0371 impl Bar for dyn Baz { } -//[old]~^ ERROR E0371 -//[re]~^^ ERROR E0371 +//~^ ERROR E0371 impl Baz for dyn Baz { } -//[old]~^ ERROR E0371 -//[re]~^^ ERROR E0371 +//~^ ERROR E0371 // But other random traits are: trait Other { } diff --git a/src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr b/src/test/ui/coherence/coherence-impl-trait-for-trait.stderr index 4819ce9260e..cf0b38c5bb8 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-trait.stderr @@ -1,17 +1,17 @@ error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Foo` - --> $DIR/coherence-impl-trait-for-trait.rs:13:1 + --> $DIR/coherence-impl-trait-for-trait.rs:9:1 | LL | impl Foo for dyn Baz { } | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo` error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Bar` - --> $DIR/coherence-impl-trait-for-trait.rs:16:1 + --> $DIR/coherence-impl-trait-for-trait.rs:11:1 | LL | impl Bar for dyn Baz { } | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar` error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Baz` - --> $DIR/coherence-impl-trait-for-trait.rs:19:1 + --> $DIR/coherence-impl-trait-for-trait.rs:13:1 | LL | impl Baz for dyn Baz { } | ^^^^^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz` diff --git a/src/test/ui/coherence/coherence-impls-copy.re.stderr b/src/test/ui/coherence/coherence-impls-copy.re.stderr deleted file mode 100644 index 742845b1907..00000000000 --- a/src/test/ui/coherence/coherence-impls-copy.re.stderr +++ /dev/null @@ -1,95 +0,0 @@ -error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`: - --> $DIR/coherence-impls-copy.rs:8:1 - | -LL | impl Copy for i32 {} - | ^^^^^^^^^^^^^^^^^ - | - = note: conflicting implementation in crate `core`: - - impl std::marker::Copy for i32; - -error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`: - --> $DIR/coherence-impls-copy.rs:37:1 - | -LL | impl Copy for &'static NotSync {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: conflicting implementation in crate `core`: - - impl<T> std::marker::Copy for &T - where T: ?Sized; - -error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`: - --> $DIR/coherence-impls-copy.rs:45:1 - | -LL | impl Copy for &'static [NotSync] {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: conflicting implementation in crate `core`: - - impl<T> std::marker::Copy for &T - where T: ?Sized; - -error[E0206]: the trait `Copy` may not be implemented for this type - --> $DIR/coherence-impls-copy.rs:27:15 - | -LL | impl Copy for &'static mut MyType {} - | ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration - -error[E0206]: the trait `Copy` may not be implemented for this type - --> $DIR/coherence-impls-copy.rs:32:15 - | -LL | impl Copy for (MyType, MyType) {} - | ^^^^^^^^^^^^^^^^ type is not a structure or enumeration - -error[E0206]: the trait `Copy` may not be implemented for this type - --> $DIR/coherence-impls-copy.rs:40:15 - | -LL | impl Copy for [MyType] {} - | ^^^^^^^^ type is not a structure or enumeration - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:8:1 - | -LL | impl Copy for i32 {} - | ^^^^^^^^^^^^^^--- - | | | - | | `i32` is not defined in the current crate - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:32:1 - | -LL | impl Copy for (MyType, MyType) {} - | ^^^^^^^^^^^^^^---------------- - | | | - | | this is not defined in the current crate because tuples are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:40:1 - | -LL | impl Copy for [MyType] {} - | ^^^^^^^^^^^^^^-------- - | | | - | | this is not defined in the current crate because slices are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:45:1 - | -LL | impl Copy for &'static [NotSync] {} - | ^^^^^^^^^^^^^^------------------ - | | | - | | this is not defined in the current crate because slices are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to 10 previous errors - -Some errors have detailed explanations: E0117, E0119, E0206. -For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-copy.rs b/src/test/ui/coherence/coherence-impls-copy.rs index 97133bc33ce..dec40f9dd40 100644 --- a/src/test/ui/coherence/coherence-impls-copy.rs +++ b/src/test/ui/coherence/coherence-impls-copy.rs @@ -1,15 +1,10 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(optin_builtin_traits)] use std::marker::Copy; impl Copy for i32 {} -//[old]~^ ERROR conflicting implementations of trait `std::marker::Copy` for type `i32`: -//[old]~| ERROR only traits defined in the current crate can be implemented for arbitrary types -//[re]~^^^ ERROR E0119 -//[re]~| ERROR E0117 +//~^ ERROR E0119 +//~| ERROR E0117 enum TestE { A } @@ -25,27 +20,19 @@ impl Clone for TestE { fn clone(&self) -> Self { *self } } impl Copy for MyType {} impl Copy for &'static mut MyType {} -//[old]~^ ERROR the trait `Copy` may not be implemented for this type -//[re]~^^ ERROR E0206 +//~^ ERROR E0206 impl Clone for MyType { fn clone(&self) -> Self { *self } } impl Copy for (MyType, MyType) {} -//[old]~^ ERROR the trait `Copy` may not be implemented for this type -//[old]~| ERROR only traits defined in the current crate can be implemented for arbitrary types -//[re]~^^^ ERROR E0206 -//[re]~| ERROR E0117 +//~^ ERROR E0206 +//~| ERROR E0117 impl Copy for &'static NotSync {} -//[old]~^ ERROR conflicting implementations of trait `std::marker::Copy` for type `&NotSync`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 impl Copy for [MyType] {} -//[old]~^ ERROR the trait `Copy` may not be implemented for this type -//[old]~| ERROR only traits defined in the current crate can be implemented for arbitrary types -//[re]~^^^ ERROR E0206 -//[re]~| ERROR E0117 +//~^ ERROR E0206 +//~| ERROR E0117 impl Copy for &'static [NotSync] {} -//[old]~^ ERROR conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`: -//[old]~| ERROR only traits defined in the current crate can be implemented for arbitrary types -//[re]~^^^ ERROR E0119 -//[re]~| ERROR E0117 +//~^ ERROR E0119 +//~| ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-impls-copy.old.stderr b/src/test/ui/coherence/coherence-impls-copy.stderr index 742845b1907..be040b38d6b 100644 --- a/src/test/ui/coherence/coherence-impls-copy.old.stderr +++ b/src/test/ui/coherence/coherence-impls-copy.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`: - --> $DIR/coherence-impls-copy.rs:8:1 + --> $DIR/coherence-impls-copy.rs:5:1 | LL | impl Copy for i32 {} | ^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | impl Copy for i32 {} - impl std::marker::Copy for i32; error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`: - --> $DIR/coherence-impls-copy.rs:37:1 + --> $DIR/coherence-impls-copy.rs:29:1 | LL | impl Copy for &'static NotSync {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | impl Copy for &'static NotSync {} where T: ?Sized; error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`: - --> $DIR/coherence-impls-copy.rs:45:1 + --> $DIR/coherence-impls-copy.rs:34:1 | LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -28,25 +28,25 @@ LL | impl Copy for &'static [NotSync] {} where T: ?Sized; error[E0206]: the trait `Copy` may not be implemented for this type - --> $DIR/coherence-impls-copy.rs:27:15 + --> $DIR/coherence-impls-copy.rs:22:15 | LL | impl Copy for &'static mut MyType {} | ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type - --> $DIR/coherence-impls-copy.rs:32:15 + --> $DIR/coherence-impls-copy.rs:26:15 | LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^ type is not a structure or enumeration error[E0206]: the trait `Copy` may not be implemented for this type - --> $DIR/coherence-impls-copy.rs:40:15 + --> $DIR/coherence-impls-copy.rs:31:15 | LL | impl Copy for [MyType] {} | ^^^^^^^^ type is not a structure or enumeration error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:8:1 + --> $DIR/coherence-impls-copy.rs:5:1 | LL | impl Copy for i32 {} | ^^^^^^^^^^^^^^--- @@ -57,7 +57,7 @@ LL | impl Copy for i32 {} = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:32:1 + --> $DIR/coherence-impls-copy.rs:26:1 | LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^---------------- @@ -68,7 +68,7 @@ LL | impl Copy for (MyType, MyType) {} = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:40:1 + --> $DIR/coherence-impls-copy.rs:31:1 | LL | impl Copy for [MyType] {} | ^^^^^^^^^^^^^^-------- @@ -79,7 +79,7 @@ LL | impl Copy for [MyType] {} = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-copy.rs:45:1 + --> $DIR/coherence-impls-copy.rs:34:1 | LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^------------------ diff --git a/src/test/ui/coherence/coherence-impls-send.re.stderr b/src/test/ui/coherence/coherence-impls-send.re.stderr deleted file mode 100644 index 7584b01ca89..00000000000 --- a/src/test/ui/coherence/coherence-impls-send.re.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-send.rs:20:1 - | -LL | unsafe impl Send for (MyType, MyType) {} - | ^^^^^^^^^^^^^^^^^^^^^---------------- - | | | - | | this is not defined in the current crate because tuples are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync` - --> $DIR/coherence-impls-send.rs:24:1 - | -LL | unsafe impl Send for &'static NotSync {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-send.rs:28:1 - | -LL | unsafe impl Send for [MyType] {} - | ^^^^^^^^^^^^^^^^^^^^^-------- - | | | - | | this is not defined in the current crate because slices are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-send.rs:32:1 - | -LL | unsafe impl Send for &'static [NotSync] {} - | ^^^^^^^^^^^^^^^^^^^^^------------------ - | | | - | | this is not defined in the current crate because slices are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0117, E0321. -For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-send.rs b/src/test/ui/coherence/coherence-impls-send.rs index ef13e9caa66..b2a9c5be658 100644 --- a/src/test/ui/coherence/coherence-impls-send.rs +++ b/src/test/ui/coherence/coherence-impls-send.rs @@ -1,6 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(optin_builtin_traits)] #![feature(overlapping_marker_traits)] @@ -18,20 +15,16 @@ impl !Sync for NotSync {} unsafe impl Send for TestE {} unsafe impl Send for MyType {} unsafe impl Send for (MyType, MyType) {} -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 unsafe impl Send for &'static NotSync {} -//[old]~^ ERROR E0321 -//[re]~^^ ERROR E0321 +//~^ ERROR E0321 unsafe impl Send for [MyType] {} -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 unsafe impl Send for &'static [NotSync] {} -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-impls-send.old.stderr b/src/test/ui/coherence/coherence-impls-send.stderr index 7584b01ca89..a5b3c7657bd 100644 --- a/src/test/ui/coherence/coherence-impls-send.old.stderr +++ b/src/test/ui/coherence/coherence-impls-send.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-send.rs:20:1 + --> $DIR/coherence-impls-send.rs:17:1 | LL | unsafe impl Send for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^---------------- @@ -10,13 +10,13 @@ LL | unsafe impl Send for (MyType, MyType) {} = note: define and implement a trait or new type instead error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync` - --> $DIR/coherence-impls-send.rs:24:1 + --> $DIR/coherence-impls-send.rs:20:1 | LL | unsafe impl Send for &'static NotSync {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-send.rs:28:1 + --> $DIR/coherence-impls-send.rs:23:1 | LL | unsafe impl Send for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^-------- @@ -27,7 +27,7 @@ LL | unsafe impl Send for [MyType] {} = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-send.rs:32:1 + --> $DIR/coherence-impls-send.rs:26:1 | LL | unsafe impl Send for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^------------------ diff --git a/src/test/ui/coherence/coherence-impls-sized.re.stderr b/src/test/ui/coherence/coherence-impls-sized.re.stderr deleted file mode 100644 index ef999bcf461..00000000000 --- a/src/test/ui/coherence/coherence-impls-sized.re.stderr +++ /dev/null @@ -1,73 +0,0 @@ -error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:17:1 - | -LL | impl Sized for TestE {} - | ^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed - -error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:22:1 - | -LL | impl Sized for MyType {} - | ^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed - -error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:27:1 - | -LL | impl Sized for (MyType, MyType) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed - -error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:34:1 - | -LL | impl Sized for &'static NotSync {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed - -error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:39:1 - | -LL | impl Sized for [MyType] {} - | ^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed - -error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:46:1 - | -LL | impl Sized for &'static [NotSync] {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-sized.rs:27:1 - | -LL | impl Sized for (MyType, MyType) {} - | ^^^^^^^^^^^^^^^---------------- - | | | - | | this is not defined in the current crate because tuples are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-sized.rs:39:1 - | -LL | impl Sized for [MyType] {} - | ^^^^^^^^^^^^^^^-------- - | | | - | | this is not defined in the current crate because slices are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-sized.rs:46:1 - | -LL | impl Sized for &'static [NotSync] {} - | ^^^^^^^^^^^^^^^------------------ - | | | - | | this is not defined in the current crate because slices are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to 9 previous errors - -Some errors have detailed explanations: E0117, E0322. -For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-impls-sized.rs b/src/test/ui/coherence/coherence-impls-sized.rs index 84ae2dd291b..19e7349c507 100644 --- a/src/test/ui/coherence/coherence-impls-sized.rs +++ b/src/test/ui/coherence/coherence-impls-sized.rs @@ -1,6 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(optin_builtin_traits)] use std::marker::Copy; @@ -15,40 +12,25 @@ struct NotSync; impl !Sync for NotSync {} impl Sized for TestE {} -//[old]~^ ERROR E0322 -//[old]~| impl of 'Sized' not allowed -//[re]~^^^ ERROR E0322 +//~^ ERROR E0322 impl Sized for MyType {} -//[old]~^ ERROR E0322 -//[old]~| impl of 'Sized' not allowed -//[re]~^^^ ERROR E0322 +//~^ ERROR E0322 impl Sized for (MyType, MyType) {} -//[old]~^ ERROR E0322 -//[old]~| impl of 'Sized' not allowed -//[old]~| ERROR E0117 -//[re]~^^^^ ERROR E0322 -//[re]~| ERROR E0117 +//~^ ERROR E0322 +//~| ERROR E0117 impl Sized for &'static NotSync {} -//[old]~^ ERROR E0322 -//[old]~| impl of 'Sized' not allowed -//[re]~^^^ ERROR E0322 +//~^ ERROR E0322 impl Sized for [MyType] {} -//[old]~^ ERROR E0322 -//[old]~| impl of 'Sized' not allowed -//[old]~| ERROR E0117 -//[re]~^^^^ ERROR E0322 -//[re]~| ERROR E0117 +//~^ ERROR E0322 +//~| ERROR E0117 impl Sized for &'static [NotSync] {} -//[old]~^ ERROR E0322 -//[old]~| impl of 'Sized' not allowed -//[old]~| ERROR E0117 -//[re]~^^^^ ERROR E0322 -//[re]~| ERROR E0117 +//~^ ERROR E0322 +//~| ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-impls-sized.old.stderr b/src/test/ui/coherence/coherence-impls-sized.stderr index ef999bcf461..3b0a9fc60a2 100644 --- a/src/test/ui/coherence/coherence-impls-sized.old.stderr +++ b/src/test/ui/coherence/coherence-impls-sized.stderr @@ -1,41 +1,41 @@ error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:17:1 + --> $DIR/coherence-impls-sized.rs:14:1 | LL | impl Sized for TestE {} | ^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:22:1 + --> $DIR/coherence-impls-sized.rs:17:1 | LL | impl Sized for MyType {} | ^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:27:1 + --> $DIR/coherence-impls-sized.rs:20:1 | LL | impl Sized for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:34:1 + --> $DIR/coherence-impls-sized.rs:24:1 | LL | impl Sized for &'static NotSync {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:39:1 + --> $DIR/coherence-impls-sized.rs:27:1 | LL | impl Sized for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed error[E0322]: explicit impls for the `Sized` trait are not permitted - --> $DIR/coherence-impls-sized.rs:46:1 + --> $DIR/coherence-impls-sized.rs:31:1 | LL | impl Sized for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-sized.rs:27:1 + --> $DIR/coherence-impls-sized.rs:20:1 | LL | impl Sized for (MyType, MyType) {} | ^^^^^^^^^^^^^^^---------------- @@ -46,7 +46,7 @@ LL | impl Sized for (MyType, MyType) {} = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-sized.rs:39:1 + --> $DIR/coherence-impls-sized.rs:27:1 | LL | impl Sized for [MyType] {} | ^^^^^^^^^^^^^^^-------- @@ -57,7 +57,7 @@ LL | impl Sized for [MyType] {} = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-impls-sized.rs:46:1 + --> $DIR/coherence-impls-sized.rs:31:1 | LL | impl Sized for &'static [NotSync] {} | ^^^^^^^^^^^^^^^------------------ diff --git a/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.re.stderr b/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.re.stderr deleted file mode 100644 index a2fa49acd2c..00000000000 --- a/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.re.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0391]: cycle detected when processing `Trait` - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1 - | -LL | trait Trait<T> { type Assoc; } - | ^^^^^^^^^^^^^^ - | - = note: ...which again requires processing `Trait`, completing the cycle -note: cycle used when coherence checking all impls of trait `Trait` - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1 - | -LL | trait Trait<T> { type Assoc; } - | ^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0391`. diff --git a/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs b/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs index 5a6b8fb7316..7f0e5472c3c 100644 --- a/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs +++ b/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs @@ -3,15 +3,10 @@ // which is currently not supported. // // No we expect to run into a more user-friendly cycle error instead. - -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(specialization)] trait Trait<T> { type Assoc; } -//[old]~^ cycle detected -//[re]~^^ ERROR E0391 +//~^ ERROR E0391 impl<T> Trait<T> for Vec<T> { type Assoc = (); diff --git a/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.old.stderr b/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index a2fa49acd2c..e5cc298a435 100644 --- a/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.old.stderr +++ b/src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr @@ -1,12 +1,12 @@ error[E0391]: cycle detected when processing `Trait` - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1 + --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:8:1 | LL | trait Trait<T> { type Assoc; } | ^^^^^^^^^^^^^^ | = note: ...which again requires processing `Trait`, completing the cycle note: cycle used when coherence checking all impls of trait `Trait` - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1 + --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:8:1 | LL | trait Trait<T> { type Assoc; } | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/coherence/coherence-iterator-vec-any-elem.rs b/src/test/ui/coherence/coherence-iterator-vec-any-elem.rs index 051cc280b2d..43a0a5c4277 100644 --- a/src/test/ui/coherence/coherence-iterator-vec-any-elem.rs +++ b/src/test/ui/coherence/coherence-iterator-vec-any-elem.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/coherence-iterator-vec.rs b/src/test/ui/coherence/coherence-iterator-vec.rs index df6e808f7de..386fe40ac3c 100644 --- a/src/test/ui/coherence/coherence-iterator-vec.rs +++ b/src/test/ui/coherence/coherence-iterator-vec.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/coherence-lone-type-parameter.re.stderr b/src/test/ui/coherence/coherence-lone-type-parameter.re.stderr deleted file mode 100644 index 731752045cd..00000000000 --- a/src/test/ui/coherence/coherence-lone-type-parameter.re.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-lone-type-parameter.rs:9:6 - | -LL | impl<T> Remote for T { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-lone-type-parameter.rs b/src/test/ui/coherence/coherence-lone-type-parameter.rs index 63b38bf1cc1..5368fef76d0 100644 --- a/src/test/ui/coherence/coherence-lone-type-parameter.rs +++ b/src/test/ui/coherence/coherence-lone-type-parameter.rs @@ -1,14 +1,10 @@ // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; use lib::Remote; impl<T> Remote for T { } -//[old]~^ ERROR type parameter `T` must be used as the type parameter for some local type -//[re]~^^ ERROR E0210 +//~^ ERROR E0210 fn main() { } diff --git a/src/test/ui/coherence/coherence-lone-type-parameter.old.stderr b/src/test/ui/coherence/coherence-lone-type-parameter.stderr index 731752045cd..3791d96302b 100644 --- a/src/test/ui/coherence/coherence-lone-type-parameter.old.stderr +++ b/src/test/ui/coherence/coherence-lone-type-parameter.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-lone-type-parameter.rs:9:6 + --> $DIR/coherence-lone-type-parameter.rs:6:6 | LL | impl<T> Remote for T { } | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/coherence-multidispatch-tuple.rs b/src/test/ui/coherence/coherence-multidispatch-tuple.rs index 6a816664c48..fa1d4bbb496 100644 --- a/src/test/ui/coherence/coherence-multidispatch-tuple.rs +++ b/src/test/ui/coherence/coherence-multidispatch-tuple.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(unused_imports)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/coherence/coherence-negative-impls-safe-rpass.rs b/src/test/ui/coherence/coherence-negative-impls-safe-rpass.rs index 98b04489ac4..695a71cbd2d 100644 --- a/src/test/ui/coherence/coherence-negative-impls-safe-rpass.rs +++ b/src/test/ui/coherence/coherence-negative-impls-safe-rpass.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/coherence/coherence-negative-impls-safe.re.stderr b/src/test/ui/coherence/coherence-negative-impls-safe.re.stderr deleted file mode 100644 index 7ed47dca497..00000000000 --- a/src/test/ui/coherence/coherence-negative-impls-safe.re.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0198]: negative impls cannot be unsafe - --> $DIR/coherence-negative-impls-safe.rs:10:1 - | -LL | unsafe impl !Send for TestType {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0198`. diff --git a/src/test/ui/coherence/coherence-negative-impls-safe.rs b/src/test/ui/coherence/coherence-negative-impls-safe.rs index b6658d5bfa4..45c478ecc03 100644 --- a/src/test/ui/coherence/coherence-negative-impls-safe.rs +++ b/src/test/ui/coherence/coherence-negative-impls-safe.rs @@ -1,6 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(optin_builtin_traits)] use std::marker::Send; @@ -8,7 +5,6 @@ use std::marker::Send; struct TestType; unsafe impl !Send for TestType {} -//[old]~^ ERROR negative impls cannot be unsafe -//[re]~^^ ERROR E0198 +//~^ ERROR E0198 fn main() {} diff --git a/src/test/ui/coherence/coherence-negative-impls-safe.old.stderr b/src/test/ui/coherence/coherence-negative-impls-safe.stderr index 7ed47dca497..c47c9d25e36 100644 --- a/src/test/ui/coherence/coherence-negative-impls-safe.old.stderr +++ b/src/test/ui/coherence/coherence-negative-impls-safe.stderr @@ -1,5 +1,5 @@ error[E0198]: negative impls cannot be unsafe - --> $DIR/coherence-negative-impls-safe.rs:10:1 + --> $DIR/coherence-negative-impls-safe.rs:7:1 | LL | unsafe impl !Send for TestType {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.re.stderr b/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.re.stderr deleted file mode 100644 index 81465e71856..00000000000 --- a/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.re.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait`: - --> $DIR/coherence-no-direct-lifetime-dispatch.rs:10:1 - | -LL | impl<T> MyTrait for T {} - | --------------------- first implementation here -LL | impl<T: 'static> MyTrait for T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.rs b/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.rs index 9717f1ed051..d466dcac1c4 100644 --- a/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.rs +++ b/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.rs @@ -1,14 +1,9 @@ // Test that you cannot *directly* dispatch on lifetime requirements -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - trait MyTrait { fn foo() {} } impl<T> MyTrait for T {} impl<T: 'static> MyTrait for T {} -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() {} diff --git a/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.old.stderr b/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr index 81465e71856..a74ffbb3afd 100644 --- a/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.old.stderr +++ b/src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait`: - --> $DIR/coherence-no-direct-lifetime-dispatch.rs:10:1 + --> $DIR/coherence-no-direct-lifetime-dispatch.rs:6:1 | LL | impl<T> MyTrait for T {} | --------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-orphan.re.stderr b/src/test/ui/coherence/coherence-orphan.re.stderr deleted file mode 100644 index a353acf0679..00000000000 --- a/src/test/ui/coherence/coherence-orphan.re.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-orphan.rs:13:1 - | -LL | impl TheTrait<usize> for isize { } - | ^^^^^---------------^^^^^----- - | | | | - | | | `isize` is not defined in the current crate - | | `usize` is not defined in the current crate - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-orphan.rs:21:1 - | -LL | impl !Send for Vec<isize> { } - | ^^^^^^^^^^^^^^^---------- - | | | - | | `std::vec::Vec` is not defined in the current crate - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-orphan.rs b/src/test/ui/coherence/coherence-orphan.rs index 18f50e46021..a7b48825d7c 100644 --- a/src/test/ui/coherence/coherence-orphan.rs +++ b/src/test/ui/coherence/coherence-orphan.rs @@ -1,7 +1,4 @@ // aux-build:coherence_orphan_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(optin_builtin_traits)] extern crate coherence_orphan_lib as lib; @@ -11,15 +8,13 @@ use lib::TheTrait; struct TheType; impl TheTrait<usize> for isize { } -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 impl TheTrait<TheType> for isize { } impl TheTrait<isize> for TheType { } impl !Send for Vec<isize> { } -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-orphan.old.stderr b/src/test/ui/coherence/coherence-orphan.stderr index a353acf0679..fb518f8ecba 100644 --- a/src/test/ui/coherence/coherence-orphan.old.stderr +++ b/src/test/ui/coherence/coherence-orphan.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-orphan.rs:13:1 + --> $DIR/coherence-orphan.rs:10:1 | LL | impl TheTrait<usize> for isize { } | ^^^^^---------------^^^^^----- @@ -11,7 +11,7 @@ LL | impl TheTrait<usize> for isize { } = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-orphan.rs:21:1 + --> $DIR/coherence-orphan.rs:17:1 | LL | impl !Send for Vec<isize> { } | ^^^^^^^^^^^^^^^---------- diff --git a/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.re.stderr b/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.re.stderr deleted file mode 100644 index c7f85b0b590..00000000000 --- a/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `From<(_,)>` for type `(_,)`: - --> $DIR/coherence-overlap-all-t-and-tuple.rs:20:1 - | -LL | impl <T> From<T> for T { - | ---------------------- first implementation here -... -LL | impl <T11, U11> From<(U11,)> for (T11,) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.rs b/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.rs index bf3ce89f70b..574a16a1911 100644 --- a/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.rs +++ b/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.rs @@ -6,10 +6,6 @@ // // Seems pretty basic, but then there was issue #24241. :) -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - trait From<U> { fn foo() {} } @@ -18,8 +14,7 @@ impl <T> From<T> for T { } impl <T11, U11> From<(U11,)> for (T11,) { -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 } fn main() { } diff --git a/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.old.stderr b/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.stderr index c7f85b0b590..5e8bfbcc3ca 100644 --- a/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-all-t-and-tuple.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `From<(_,)>` for type `(_,)`: - --> $DIR/coherence-overlap-all-t-and-tuple.rs:20:1 + --> $DIR/coherence-overlap-all-t-and-tuple.rs:16:1 | LL | impl <T> From<T> for T { | ---------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-overlap-downstream-inherent.re.stderr b/src/test/ui/coherence/coherence-overlap-downstream-inherent.re.stderr deleted file mode 100644 index dcfc017f1b0..00000000000 --- a/src/test/ui/coherence/coherence-overlap-downstream-inherent.re.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0592]: duplicate definitions with name `dummy` - --> $DIR/coherence-overlap-downstream-inherent.rs:11:26 - | -LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } } - | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... -LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } } - | ------------------- other definition for `dummy` - -error[E0592]: duplicate definitions with name `f` - --> $DIR/coherence-overlap-downstream-inherent.rs:18:38 - | -LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} } - | ^^^^^^^^^^^^^^ duplicate definitions for `f` -... -LL | impl<X> A<i32, X> { fn f(&self) {} } - | -------------- other definition for `f` - | - = note: downstream crates may implement trait `Bar<_>` for type `i32` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-downstream-inherent.rs b/src/test/ui/coherence/coherence-overlap-downstream-inherent.rs index ad54d247f91..5dea33e330b 100644 --- a/src/test/ui/coherence/coherence-overlap-downstream-inherent.rs +++ b/src/test/ui/coherence/coherence-overlap-downstream-inherent.rs @@ -1,23 +1,17 @@ // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even // though no impls are found. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - struct Sweet<X>(X); pub trait Sugar {} pub trait Fruit {} impl<T:Sugar> Sweet<T> { fn dummy(&self) { } } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl<T:Fruit> Sweet<T> { fn dummy(&self) { } } trait Bar<X> {} struct A<T, X>(T, X); impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl<X> A<i32, X> { fn f(&self) {} } fn main() {} diff --git a/src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr b/src/test/ui/coherence/coherence-overlap-downstream-inherent.stderr index dcfc017f1b0..4cb7390453c 100644 --- a/src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-downstream-inherent.stderr @@ -1,18 +1,18 @@ error[E0592]: duplicate definitions with name `dummy` - --> $DIR/coherence-overlap-downstream-inherent.rs:11:26 + --> $DIR/coherence-overlap-downstream-inherent.rs:7:26 | LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... +LL | LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } } | ------------------- other definition for `dummy` error[E0592]: duplicate definitions with name `f` - --> $DIR/coherence-overlap-downstream-inherent.rs:18:38 + --> $DIR/coherence-overlap-downstream-inherent.rs:13:38 | LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} } | ^^^^^^^^^^^^^^ duplicate definitions for `f` -... +LL | LL | impl<X> A<i32, X> { fn f(&self) {} } | -------------- other definition for `f` | diff --git a/src/test/ui/coherence/coherence-overlap-downstream.re.stderr b/src/test/ui/coherence/coherence-overlap-downstream.re.stderr deleted file mode 100644 index b4847c03d41..00000000000 --- a/src/test/ui/coherence/coherence-overlap-downstream.re.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0119]: conflicting implementations of trait `Sweet`: - --> $DIR/coherence-overlap-downstream.rs:12:1 - | -LL | impl<T:Sugar> Sweet for T { } - | ------------------------- first implementation here -LL | impl<T:Fruit> Sweet for T { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`: - --> $DIR/coherence-overlap-downstream.rs:19:1 - | -LL | impl<X, T> Foo<X> for T where T: Bar<X> {} - | --------------------------------------- first implementation here -LL | impl<X> Foo<X> for i32 {} - | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` - | - = note: downstream crates may implement trait `Bar<_>` for type `i32` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-overlap-downstream.rs b/src/test/ui/coherence/coherence-overlap-downstream.rs index c6ced7b80fd..738ec0e3d45 100644 --- a/src/test/ui/coherence/coherence-overlap-downstream.rs +++ b/src/test/ui/coherence/coherence-overlap-downstream.rs @@ -1,23 +1,17 @@ // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even // though no impls are found. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - pub trait Sugar {} pub trait Fruit {} pub trait Sweet {} impl<T:Sugar> Sweet for T { } impl<T:Fruit> Sweet for T { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 pub trait Foo<X> {} pub trait Bar<X> {} impl<X, T> Foo<X> for T where T: Bar<X> {} impl<X> Foo<X> for i32 {} -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() { } diff --git a/src/test/ui/coherence/coherence-overlap-downstream.old.stderr b/src/test/ui/coherence/coherence-overlap-downstream.stderr index b4847c03d41..6fb398562d6 100644 --- a/src/test/ui/coherence/coherence-overlap-downstream.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-downstream.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Sweet`: - --> $DIR/coherence-overlap-downstream.rs:12:1 + --> $DIR/coherence-overlap-downstream.rs:8:1 | LL | impl<T:Sugar> Sweet for T { } | ------------------------- first implementation here @@ -7,7 +7,7 @@ LL | impl<T:Fruit> Sweet for T { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`: - --> $DIR/coherence-overlap-downstream.rs:19:1 + --> $DIR/coherence-overlap-downstream.rs:14:1 | LL | impl<X, T> Foo<X> for T where T: Bar<X> {} | --------------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.re.stderr b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.re.stderr deleted file mode 100644 index 6fd93077540..00000000000 --- a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0592]: duplicate definitions with name `dummy` - --> $DIR/coherence-overlap-issue-23516-inherent.rs:13:25 - | -LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } } - | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... -LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } } - | ------------------- other definition for `dummy` - | - = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.rs b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.rs index 969366e29cc..a272e620fca 100644 --- a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.rs +++ b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.rs @@ -2,17 +2,12 @@ // though we see no impl of `Sugar` for `Box`. Therefore, an overlap // error is reported for the following pair of impls (#23516). -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - pub trait Sugar {} struct Cake<X>(X); impl<T:Sugar> Cake<T> { fn dummy(&self) { } } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } } fn main() { } diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.stderr index 6fd93077540..e63f8a997af 100644 --- a/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-issue-23516-inherent.stderr @@ -1,9 +1,9 @@ error[E0592]: duplicate definitions with name `dummy` - --> $DIR/coherence-overlap-issue-23516-inherent.rs:13:25 + --> $DIR/coherence-overlap-issue-23516-inherent.rs:9:25 | LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... +LL | LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } } | ------------------- other definition for `dummy` | diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516.re.stderr b/src/test/ui/coherence/coherence-overlap-issue-23516.re.stderr deleted file mode 100644 index d17d67adf0e..00000000000 --- a/src/test/ui/coherence/coherence-overlap-issue-23516.re.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`: - --> $DIR/coherence-overlap-issue-23516.rs:12:1 - | -LL | impl<T:Sugar> Sweet for T { } - | ------------------------- first implementation here -LL | impl<U:Sugar> Sweet for Box<U> { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::boxed::Box<_>` - | - = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516.rs b/src/test/ui/coherence/coherence-overlap-issue-23516.rs index e3c15e149f8..63e42e8f412 100644 --- a/src/test/ui/coherence/coherence-overlap-issue-23516.rs +++ b/src/test/ui/coherence/coherence-overlap-issue-23516.rs @@ -2,15 +2,10 @@ // though we see no impl of `Sugar` for `Box`. Therefore, an overlap // error is reported for the following pair of impls (#23516). -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - pub trait Sugar { fn dummy(&self) { } } pub trait Sweet { fn dummy(&self) { } } impl<T:Sugar> Sweet for T { } impl<U:Sugar> Sweet for Box<U> { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() { } diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516.old.stderr b/src/test/ui/coherence/coherence-overlap-issue-23516.stderr index d17d67adf0e..fe4c5cf3490 100644 --- a/src/test/ui/coherence/coherence-overlap-issue-23516.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-issue-23516.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`: - --> $DIR/coherence-overlap-issue-23516.rs:12:1 + --> $DIR/coherence-overlap-issue-23516.rs:8:1 | LL | impl<T:Sugar> Sweet for T { } | ------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-overlap-messages.re.stderr b/src/test/ui/coherence/coherence-overlap-messages.re.stderr deleted file mode 100644 index 429e67573b5..00000000000 --- a/src/test/ui/coherence/coherence-overlap-messages.re.stderr +++ /dev/null @@ -1,44 +0,0 @@ -error[E0119]: conflicting implementations of trait `Foo`: - --> $DIR/coherence-overlap-messages.rs:8:1 - | -LL | impl<T> Foo for T {} - | ----------------- first implementation here -LL | impl<U> Foo for U {} - | ^^^^^^^^^^^^^^^^^ conflicting implementation - -error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`: - --> $DIR/coherence-overlap-messages.rs:16:1 - | -LL | impl<T> Bar for (T, u8) {} - | ----------------------- first implementation here -LL | impl<T> Bar for (u8, T) {} - | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)` - -error[E0119]: conflicting implementations of trait `Baz<u8>` for type `u8`: - --> $DIR/coherence-overlap-messages.rs:23:1 - | -LL | impl<T> Baz<u8> for T {} - | --------------------- first implementation here -LL | impl<T> Baz<T> for u8 {} - | ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8` - -error[E0119]: conflicting implementations of trait `Quux<_, _>`: - --> $DIR/coherence-overlap-messages.rs:30:1 - | -LL | impl<T, U, V> Quux<U, V> for T {} - | ------------------------------ first implementation here -LL | impl<T, U> Quux<U, U> for T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error[E0119]: conflicting implementations of trait `Quux<_, _>`: - --> $DIR/coherence-overlap-messages.rs:33:1 - | -LL | impl<T, U, V> Quux<U, V> for T {} - | ------------------------------ first implementation here -... -LL | impl<T, V> Quux<T, V> for T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-overlap-messages.rs b/src/test/ui/coherence/coherence-overlap-messages.rs index e0e2e672e98..1258a237114 100644 --- a/src/test/ui/coherence/coherence-overlap-messages.rs +++ b/src/test/ui/coherence/coherence-overlap-messages.rs @@ -1,37 +1,28 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - trait Foo { fn foo() {} } impl<T> Foo for T {} impl<U> Foo for U {} -//[old]~^ ERROR conflicting implementations of trait `Foo`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 trait Bar { fn bar() {} } impl<T> Bar for (T, u8) {} impl<T> Bar for (u8, T) {} -//[old]~^ ERROR conflicting implementations of trait `Bar` for type `(u8, u8)`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 trait Baz<T> { fn baz() {} } impl<T> Baz<u8> for T {} impl<T> Baz<T> for u8 {} -//[old]~^ ERROR conflicting implementations of trait `Baz<u8>` for type `u8`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 trait Quux<U, V> { fn quux() {} } impl<T, U, V> Quux<U, V> for T {} impl<T, U> Quux<U, U> for T {} -//[old]~^ ERROR conflicting implementations of trait `Quux<_, _>`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 impl<T, V> Quux<T, V> for T {} -//[old]~^ ERROR conflicting implementations of trait `Quux<_, _>`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() {} diff --git a/src/test/ui/coherence/coherence-overlap-messages.old.stderr b/src/test/ui/coherence/coherence-overlap-messages.stderr index 429e67573b5..28147f52fa6 100644 --- a/src/test/ui/coherence/coherence-overlap-messages.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-messages.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Foo`: - --> $DIR/coherence-overlap-messages.rs:8:1 + --> $DIR/coherence-overlap-messages.rs:4:1 | LL | impl<T> Foo for T {} | ----------------- first implementation here @@ -7,7 +7,7 @@ LL | impl<U> Foo for U {} | ^^^^^^^^^^^^^^^^^ conflicting implementation error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`: - --> $DIR/coherence-overlap-messages.rs:16:1 + --> $DIR/coherence-overlap-messages.rs:11:1 | LL | impl<T> Bar for (T, u8) {} | ----------------------- first implementation here @@ -15,7 +15,7 @@ LL | impl<T> Bar for (u8, T) {} | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)` error[E0119]: conflicting implementations of trait `Baz<u8>` for type `u8`: - --> $DIR/coherence-overlap-messages.rs:23:1 + --> $DIR/coherence-overlap-messages.rs:17:1 | LL | impl<T> Baz<u8> for T {} | --------------------- first implementation here @@ -23,7 +23,7 @@ LL | impl<T> Baz<T> for u8 {} | ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8` error[E0119]: conflicting implementations of trait `Quux<_, _>`: - --> $DIR/coherence-overlap-messages.rs:30:1 + --> $DIR/coherence-overlap-messages.rs:23:1 | LL | impl<T, U, V> Quux<U, V> for T {} | ------------------------------ first implementation here @@ -31,7 +31,7 @@ LL | impl<T, U> Quux<U, U> for T {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation error[E0119]: conflicting implementations of trait `Quux<_, _>`: - --> $DIR/coherence-overlap-messages.rs:33:1 + --> $DIR/coherence-overlap-messages.rs:25:1 | LL | impl<T, U, V> Quux<U, V> for T {} | ------------------------------ first implementation here diff --git a/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr b/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr deleted file mode 100644 index 3a3e1a4afc3..00000000000 --- a/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0592]: duplicate definitions with name `dummy` - --> $DIR/coherence-overlap-upstream-inherent.rs:15:32 - | -LL | impl<T> A<T> where T: Remote { fn dummy(&self) { } } - | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... -LL | impl A<i16> { fn dummy(&self) { } } - | ------------------- other definition for `dummy` - | - = note: upstream crates may add a new impl of trait `coherence_lib::Remote` for type `i16` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0592`. diff --git a/src/test/ui/coherence/coherence-overlap-upstream-inherent.rs b/src/test/ui/coherence/coherence-overlap-upstream-inherent.rs index 92b619af076..082d753debb 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream-inherent.rs +++ b/src/test/ui/coherence/coherence-overlap-upstream-inherent.rs @@ -2,9 +2,6 @@ // though the upstream crate doesn't implement it for now. // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib; @@ -13,8 +10,7 @@ use coherence_lib::Remote; struct A<X>(X); impl<T> A<T> where T: Remote { fn dummy(&self) { } } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl A<i16> { fn dummy(&self) { } } fn main() {} diff --git a/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr b/src/test/ui/coherence/coherence-overlap-upstream-inherent.stderr index 3a3e1a4afc3..51316f24975 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream-inherent.stderr @@ -1,9 +1,9 @@ error[E0592]: duplicate definitions with name `dummy` - --> $DIR/coherence-overlap-upstream-inherent.rs:15:32 + --> $DIR/coherence-overlap-upstream-inherent.rs:12:32 | LL | impl<T> A<T> where T: Remote { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... +LL | LL | impl A<i16> { fn dummy(&self) { } } | ------------------- other definition for `dummy` | diff --git a/src/test/ui/coherence/coherence-overlap-upstream.re.stderr b/src/test/ui/coherence/coherence-overlap-upstream.re.stderr deleted file mode 100644 index bd6f59f346b..00000000000 --- a/src/test/ui/coherence/coherence-overlap-upstream.re.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0119]: conflicting implementations of trait `Foo` for type `i16`: - --> $DIR/coherence-overlap-upstream.rs:16:1 - | -LL | impl<T> Foo for T where T: Remote {} - | --------------------------------- first implementation here -LL | impl Foo for i16 {} - | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` - | - = note: upstream crates may add a new impl of trait `coherence_lib::Remote` for type `i16` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-overlap-upstream.rs b/src/test/ui/coherence/coherence-overlap-upstream.rs index 62f675003f9..8f1e6558b15 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream.rs +++ b/src/test/ui/coherence/coherence-overlap-upstream.rs @@ -2,9 +2,6 @@ // though the upstream crate doesn't implement it for now. // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib; @@ -14,7 +11,6 @@ use coherence_lib::Remote; trait Foo {} impl<T> Foo for T where T: Remote {} impl Foo for i16 {} -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() {} diff --git a/src/test/ui/coherence/coherence-overlap-upstream.old.stderr b/src/test/ui/coherence/coherence-overlap-upstream.stderr index bd6f59f346b..8d3de9a243e 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i16`: - --> $DIR/coherence-overlap-upstream.rs:16:1 + --> $DIR/coherence-overlap-upstream.rs:13:1 | LL | impl<T> Foo for T where T: Remote {} | --------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-overlapping-pairs.old.stderr b/src/test/ui/coherence/coherence-overlapping-pairs.old.stderr deleted file mode 100644 index 7c62716f705..00000000000 --- a/src/test/ui/coherence/coherence-overlapping-pairs.old.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-overlapping-pairs.rs:11:6 - | -LL | impl<T> Remote for lib::Pair<T,Foo> { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-overlapping-pairs.rs b/src/test/ui/coherence/coherence-overlapping-pairs.rs index de31a083940..d5d18217bd6 100644 --- a/src/test/ui/coherence/coherence-overlapping-pairs.rs +++ b/src/test/ui/coherence/coherence-overlapping-pairs.rs @@ -1,7 +1,4 @@ // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; use lib::Remote; @@ -9,7 +6,6 @@ use lib::Remote; struct Foo; impl<T> Remote for lib::Pair<T,Foo> { } -//[old]~^ ERROR type parameter `T` must be used as the type parameter for some local type -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-overlapping-pairs.re.stderr b/src/test/ui/coherence/coherence-overlapping-pairs.stderr index 2277b33fceb..69a4627a7b8 100644 --- a/src/test/ui/coherence/coherence-overlapping-pairs.re.stderr +++ b/src/test/ui/coherence/coherence-overlapping-pairs.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-overlapping-pairs.rs:11:1 + --> $DIR/coherence-overlapping-pairs.rs:8:1 | LL | impl<T> Remote for lib::Pair<T,Foo> { } | ^^^^^^^^^^^^^^^^^^^---------------- diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.old.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.old.stderr deleted file mode 100644 index 9f55df4c974..00000000000 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.old.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-pair-covered-uncovered-1.rs:15:6 - | -LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.rs b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.rs index 91794b7999b..15868ca8686 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.rs +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.rs @@ -2,9 +2,6 @@ // list of type parameters, not the self type. // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; @@ -13,7 +10,6 @@ use lib::{Remote1, Pair}; pub struct Local<T>(T); impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { } -//[old]~^ ERROR type parameter `T` must be used as the type parameter for some local type -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.re.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr index f6e755b6662..f6b9869e177 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.re.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-pair-covered-uncovered-1.rs:15:1 + --> $DIR/coherence-pair-covered-uncovered-1.rs:12:1 | LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { } | ^^^^^^^^^^^--------------------------^^^^^--- diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered.old.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered.old.stderr deleted file mode 100644 index 4084061eb4a..00000000000 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered.old.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-pair-covered-uncovered.rs:11:6 - | -LL | impl<T,U> Remote for Pair<T,Local<U>> { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered.rs b/src/test/ui/coherence/coherence-pair-covered-uncovered.rs index 49a91412bec..da970572fde 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered.rs +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered.rs @@ -1,7 +1,4 @@ // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; use lib::{Remote, Pair}; @@ -9,7 +6,6 @@ use lib::{Remote, Pair}; struct Local<T>(T); impl<T,U> Remote for Pair<T,Local<U>> { } -//[old]~^ ERROR type parameter `T` must be used as the type parameter for some local type -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered.re.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr index 9fa860cb584..d1a4993e0f2 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered.re.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-pair-covered-uncovered.rs:11:1 + --> $DIR/coherence-pair-covered-uncovered.rs:8:1 | LL | impl<T,U> Remote for Pair<T,Local<U>> { } | ^^^^^^^^^^^^^^^^^^^^^---------------- diff --git a/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr b/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr deleted file mode 100644 index 728eae5e547..00000000000 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`: - --> $DIR/coherence-projection-conflict-orphan.rs:19:1 - | -LL | impl Foo<i32> for i32 { } - | --------------------- first implementation here -LL | -LL | impl<A:Iterator> Foo<A::Item> for A { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` - | - = note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `i32` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-projection-conflict-orphan.rs b/src/test/ui/coherence/coherence-projection-conflict-orphan.rs index 4f7fc71536b..637dd250638 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.rs +++ b/src/test/ui/coherence/coherence-projection-conflict-orphan.rs @@ -1,6 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![feature(rustc_attrs)] // Here we expect a coherence conflict because, even though `i32` does @@ -17,7 +14,6 @@ pub trait Bar { impl Foo<i32> for i32 { } impl<A:Iterator> Foo<A::Item> for A { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() {} diff --git a/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr b/src/test/ui/coherence/coherence-projection-conflict-orphan.stderr index 728eae5e547..06a840255bd 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict-orphan.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`: - --> $DIR/coherence-projection-conflict-orphan.rs:19:1 + --> $DIR/coherence-projection-conflict-orphan.rs:16:1 | LL | impl Foo<i32> for i32 { } | --------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-projection-conflict-ty-param.re.stderr b/src/test/ui/coherence/coherence-projection-conflict-ty-param.re.stderr deleted file mode 100644 index b53a4c973ed..00000000000 --- a/src/test/ui/coherence/coherence-projection-conflict-ty-param.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::option::Option<_>`: - --> $DIR/coherence-projection-conflict-ty-param.rs:14:1 - | -LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {} - | ---------------------------------------- first implementation here -LL | -LL | impl<T, U> Foo<T> for Option<U> { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::option::Option<_>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-projection-conflict-ty-param.rs b/src/test/ui/coherence/coherence-projection-conflict-ty-param.rs index 819947fa547..3e4141fa8cb 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-ty-param.rs +++ b/src/test/ui/coherence/coherence-projection-conflict-ty-param.rs @@ -1,10 +1,6 @@ // Coherence error results because we do not know whether `T: Foo<P>` or not // for the second impl. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::marker::PhantomData; pub trait Foo<P> { fn foo() {} } @@ -12,7 +8,6 @@ pub trait Foo<P> { fn foo() {} } impl <P, T: Foo<P>> Foo<P> for Option<T> {} impl<T, U> Foo<T> for Option<U> { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() {} diff --git a/src/test/ui/coherence/coherence-projection-conflict-ty-param.old.stderr b/src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr index b53a4c973ed..c5c9b0ac33c 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-ty-param.old.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::option::Option<_>`: - --> $DIR/coherence-projection-conflict-ty-param.rs:14:1 + --> $DIR/coherence-projection-conflict-ty-param.rs:10:1 | LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {} | ---------------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-projection-conflict.re.stderr b/src/test/ui/coherence/coherence-projection-conflict.re.stderr deleted file mode 100644 index c2e5fc86175..00000000000 --- a/src/test/ui/coherence/coherence-projection-conflict.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`: - --> $DIR/coherence-projection-conflict.rs:15:1 - | -LL | impl Foo<i32> for i32 { } - | --------------------- first implementation here -LL | -LL | impl<A:Bar> Foo<A::Output> for A { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-projection-conflict.rs b/src/test/ui/coherence/coherence-projection-conflict.rs index 4086aeef8c0..daab2a2f8b4 100644 --- a/src/test/ui/coherence/coherence-projection-conflict.rs +++ b/src/test/ui/coherence/coherence-projection-conflict.rs @@ -1,7 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::marker::PhantomData; pub trait Foo<P> { fn foo() {} } @@ -13,8 +9,7 @@ pub trait Bar { impl Foo<i32> for i32 { } impl<A:Bar> Foo<A::Output> for A { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 impl Bar for i32 { type Output = i32; diff --git a/src/test/ui/coherence/coherence-projection-conflict.old.stderr b/src/test/ui/coherence/coherence-projection-conflict.stderr index c2e5fc86175..aed6910b529 100644 --- a/src/test/ui/coherence/coherence-projection-conflict.old.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`: - --> $DIR/coherence-projection-conflict.rs:15:1 + --> $DIR/coherence-projection-conflict.rs:11:1 | LL | impl Foo<i32> for i32 { } | --------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-projection-ok-orphan.rs b/src/test/ui/coherence/coherence-projection-ok-orphan.rs index b34c31dcddb..42b4b1912e2 100644 --- a/src/test/ui/coherence/coherence-projection-ok-orphan.rs +++ b/src/test/ui/coherence/coherence-projection-ok-orphan.rs @@ -2,9 +2,6 @@ // does not hold and (due to the orphan rules), we can rely on that. // check-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] pub trait Foo<P> {} diff --git a/src/test/ui/coherence/coherence-projection-ok.rs b/src/test/ui/coherence/coherence-projection-ok.rs index f4f5ca64de7..44fc02a5c20 100644 --- a/src/test/ui/coherence/coherence-projection-ok.rs +++ b/src/test/ui/coherence/coherence-projection-ok.rs @@ -1,7 +1,4 @@ // check-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] pub trait Foo<P> {} diff --git a/src/test/ui/coherence/coherence-rfc447-constrained.rs b/src/test/ui/coherence/coherence-rfc447-constrained.rs index 4da54d386fd..9d1d8688325 100644 --- a/src/test/ui/coherence/coherence-rfc447-constrained.rs +++ b/src/test/ui/coherence/coherence-rfc447-constrained.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] // check that trait matching can handle impls whose types are only // constrained by a projection. diff --git a/src/test/ui/coherence/coherence-subtyping.rs b/src/test/ui/coherence/coherence-subtyping.rs index a0ff580671a..a742bf2884e 100644 --- a/src/test/ui/coherence/coherence-subtyping.rs +++ b/src/test/ui/coherence/coherence-subtyping.rs @@ -7,8 +7,6 @@ // revisions: old re // build-pass (FIXME(62277): could be check-pass?) -#![cfg_attr(re, feature(re_rebalance_coherence))] - trait TheTrait { fn foo(&self) { } } diff --git a/src/test/ui/coherence/coherence-tuple-conflict.re.stderr b/src/test/ui/coherence/coherence-tuple-conflict.re.stderr deleted file mode 100644 index e832bdebbdd..00000000000 --- a/src/test/ui/coherence/coherence-tuple-conflict.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `(_, _)`: - --> $DIR/coherence-tuple-conflict.rs:19:1 - | -LL | impl<T> MyTrait for (T,T) { - | ------------------------- first implementation here -... -LL | impl<A,B> MyTrait for (A,B) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_, _)` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence-tuple-conflict.rs b/src/test/ui/coherence/coherence-tuple-conflict.rs index 130867b2242..8cc82972668 100644 --- a/src/test/ui/coherence/coherence-tuple-conflict.rs +++ b/src/test/ui/coherence/coherence-tuple-conflict.rs @@ -1,7 +1,3 @@ -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::fmt::Debug; use std::default::Default; @@ -17,8 +13,7 @@ impl<T> MyTrait for (T,T) { } impl<A,B> MyTrait for (A,B) { -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn get(&self) -> usize { self.dummy } } diff --git a/src/test/ui/coherence/coherence-tuple-conflict.old.stderr b/src/test/ui/coherence/coherence-tuple-conflict.stderr index e832bdebbdd..f6c2bc32aa8 100644 --- a/src/test/ui/coherence/coherence-tuple-conflict.old.stderr +++ b/src/test/ui/coherence/coherence-tuple-conflict.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `(_, _)`: - --> $DIR/coherence-tuple-conflict.rs:19:1 + --> $DIR/coherence-tuple-conflict.rs:15:1 | LL | impl<T> MyTrait for (T,T) { | ------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence-vec-local-2.old.stderr b/src/test/ui/coherence/coherence-vec-local-2.old.stderr deleted file mode 100644 index fbcf8fb762a..00000000000 --- a/src/test/ui/coherence/coherence-vec-local-2.old.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/coherence-vec-local-2.rs:14:6 - | -LL | impl<T> Remote for Vec<Local<T>> { } - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. diff --git a/src/test/ui/coherence/coherence-vec-local-2.rs b/src/test/ui/coherence/coherence-vec-local-2.rs index 423543964c2..47df06bac6c 100644 --- a/src/test/ui/coherence/coherence-vec-local-2.rs +++ b/src/test/ui/coherence/coherence-vec-local-2.rs @@ -2,9 +2,6 @@ // *non-fundamental* remote type like `Vec` is not considered local. // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; use lib::Remote; @@ -12,7 +9,6 @@ use lib::Remote; struct Local<T>(T); impl<T> Remote for Vec<Local<T>> { } -//[old]~^ ERROR E0210 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-vec-local-2.re.stderr b/src/test/ui/coherence/coherence-vec-local-2.stderr index 48a2848c55f..198314d5ce5 100644 --- a/src/test/ui/coherence/coherence-vec-local-2.re.stderr +++ b/src/test/ui/coherence/coherence-vec-local-2.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-vec-local-2.rs:14:1 + --> $DIR/coherence-vec-local-2.rs:11:1 | LL | impl<T> Remote for Vec<Local<T>> { } | ^^^^^^^^^^^^^^^^^^^------------- diff --git a/src/test/ui/coherence/coherence-vec-local.old.stderr b/src/test/ui/coherence/coherence-vec-local.old.stderr deleted file mode 100644 index 4b199dd9142..00000000000 --- a/src/test/ui/coherence/coherence-vec-local.old.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-vec-local.rs:14:1 - | -LL | impl Remote for Vec<Local> { } - | ^^^^^^^^^^^^^^^^---------- - | | | - | | `std::vec::Vec` is not defined in the current crate - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence-vec-local.rs b/src/test/ui/coherence/coherence-vec-local.rs index 351ddd2aa67..130cc39d0af 100644 --- a/src/test/ui/coherence/coherence-vec-local.rs +++ b/src/test/ui/coherence/coherence-vec-local.rs @@ -2,9 +2,6 @@ // *non-fundamental* remote type like `Vec` is not considered local. // aux-build:coherence_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_lib as lib; use lib::Remote; @@ -12,7 +9,6 @@ use lib::Remote; struct Local; impl Remote for Vec<Local> { } -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence-vec-local.re.stderr b/src/test/ui/coherence/coherence-vec-local.stderr index 4b199dd9142..dc5a0a68959 100644 --- a/src/test/ui/coherence/coherence-vec-local.re.stderr +++ b/src/test/ui/coherence/coherence-vec-local.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence-vec-local.rs:14:1 + --> $DIR/coherence-vec-local.rs:11:1 | LL | impl Remote for Vec<Local> { } | ^^^^^^^^^^^^^^^^---------- diff --git a/src/test/ui/coherence/coherence-where-clause.rs b/src/test/ui/coherence/coherence-where-clause.rs index 28397420385..5c40def86bb 100644 --- a/src/test/ui/coherence/coherence-where-clause.rs +++ b/src/test/ui/coherence/coherence-where-clause.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] use std::fmt::Debug; use std::default::Default; diff --git a/src/test/ui/coherence/coherence_copy_like.rs b/src/test/ui/coherence/coherence_copy_like.rs index 653f76264c1..92af341ccb5 100644 --- a/src/test/ui/coherence/coherence_copy_like.rs +++ b/src/test/ui/coherence/coherence_copy_like.rs @@ -1,7 +1,4 @@ // run-pass -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs index 22517f9da2e..edee6cd7b6c 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs @@ -4,9 +4,6 @@ // aux-build:coherence_copy_like_lib.rs // build-pass (FIXME(62277): could be check-pass?) // skip-codgen -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs index 0d677800f79..599c804d213 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs @@ -3,9 +3,6 @@ // check-pass // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_copy_like_lib as lib; diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.re.stderr b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.re.stderr deleted file mode 100644 index 4d9f55c1215..00000000000 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyFundamentalStruct<(MyType,)>`: - --> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:19:1 - | -LL | impl<T: lib::MyCopy> MyTrait for T { } - | ---------------------------------- first implementation here -... -LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>` - | - = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs index 2a61042c6a0..7d851b52884 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs @@ -2,9 +2,6 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_copy_like_lib as lib; @@ -17,8 +14,7 @@ impl<T: lib::MyCopy> MyTrait for T { } // Tuples are not fundamental. impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() { } diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr index 4d9f55c1215..cf6c6fb8c7a 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyFundamentalStruct<(MyType,)>`: - --> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:19:1 + --> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:16:1 | LL | impl<T: lib::MyCopy> MyTrait for T { } | ---------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr b/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr deleted file mode 100644 index f0bcf659bb6..00000000000 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyStruct<MyType>`: - --> $DIR/coherence_copy_like_err_struct.rs:22:1 - | -LL | impl<T: lib::MyCopy> MyTrait for T { } - | ---------------------------------- first implementation here -... -LL | impl MyTrait for lib::MyStruct<MyType> { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct<MyType>` - | - = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence_copy_like_err_struct.rs b/src/test/ui/coherence/coherence_copy_like_err_struct.rs index 38fc2e662d7..fe39370c901 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_struct.rs @@ -1,7 +1,4 @@ // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] // Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. @@ -20,7 +17,6 @@ impl<T: lib::MyCopy> MyTrait for T { } // // which we cannot approve. impl MyTrait for lib::MyStruct<MyType> { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() { } diff --git a/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_struct.stderr index f0bcf659bb6..cf79e851bf4 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_struct.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyStruct<MyType>`: - --> $DIR/coherence_copy_like_err_struct.rs:22:1 + --> $DIR/coherence_copy_like_err_struct.rs:19:1 | LL | impl<T: lib::MyCopy> MyTrait for T { } | ---------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr b/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr deleted file mode 100644 index a40153af2cf..00000000000 --- a/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `(MyType,)`: - --> $DIR/coherence_copy_like_err_tuple.rs:21:1 - | -LL | impl<T: lib::MyCopy> MyTrait for T { } - | ---------------------------------- first implementation here -... -LL | impl MyTrait for (MyType,) { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)` - | - = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/coherence/coherence_copy_like_err_tuple.rs b/src/test/ui/coherence/coherence_copy_like_err_tuple.rs index 7234bed1ba0..f63e205c9f8 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_tuple.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_tuple.rs @@ -2,9 +2,6 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_copy_like_lib as lib; @@ -19,7 +16,6 @@ impl<T: lib::MyCopy> MyTrait for T { } // // which we cannot approve. impl MyTrait for (MyType,) { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 fn main() { } diff --git a/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_tuple.stderr index a40153af2cf..52f66427dfa 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_tuple.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `(MyType,)`: - --> $DIR/coherence_copy_like_err_tuple.rs:21:1 + --> $DIR/coherence_copy_like_err_tuple.rs:18:1 | LL | impl<T: lib::MyCopy> MyTrait for T { } | ---------------------------------- first implementation here diff --git a/src/test/ui/coherence/coherence_inherent.re.stderr b/src/test/ui/coherence/coherence_inherent.re.stderr deleted file mode 100644 index e71547cb89f..00000000000 --- a/src/test/ui/coherence/coherence_inherent.re.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the current scope - --> $DIR/coherence_inherent.rs:35:11 - | -LL | s.the_fn(); - | ^^^^^^ method not found in `&Lib::TheStruct` - | - = help: items from traits can only be used if the trait is in scope - = note: the following trait is implemented but not in scope; perhaps add a `use` for it: - `use Lib::TheTrait;` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/coherence/coherence_inherent.rs b/src/test/ui/coherence/coherence_inherent.rs index f0d3682adb8..f3ebf000386 100644 --- a/src/test/ui/coherence/coherence_inherent.rs +++ b/src/test/ui/coherence/coherence_inherent.rs @@ -1,10 +1,6 @@ // Tests that methods that implement a trait cannot be invoked // unless the trait is imported. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - mod Lib { pub trait TheTrait { fn the_fn(&self); @@ -33,8 +29,7 @@ mod NoImport { fn call_the_fn(s: &TheStruct) { s.the_fn(); - //[old]~^ ERROR no method named `the_fn` found - //[re]~^^ ERROR E0599 + //~^ ERROR E0599 } } diff --git a/src/test/ui/coherence/coherence_inherent.old.stderr b/src/test/ui/coherence/coherence_inherent.stderr index e71547cb89f..e719d5254f6 100644 --- a/src/test/ui/coherence/coherence_inherent.old.stderr +++ b/src/test/ui/coherence/coherence_inherent.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the current scope - --> $DIR/coherence_inherent.rs:35:11 + --> $DIR/coherence_inherent.rs:31:11 | LL | s.the_fn(); | ^^^^^^ method not found in `&Lib::TheStruct` diff --git a/src/test/ui/coherence/coherence_inherent_cc.re.stderr b/src/test/ui/coherence/coherence_inherent_cc.re.stderr deleted file mode 100644 index 3683943c5c8..00000000000 --- a/src/test/ui/coherence/coherence_inherent_cc.re.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_lib::TheStruct` in the current scope - --> $DIR/coherence_inherent_cc.rs:26:11 - | -LL | s.the_fn(); - | ^^^^^^ method not found in `&coherence_inherent_cc_lib::TheStruct` - | - = help: items from traits can only be used if the trait is in scope - = note: the following trait is implemented but not in scope; perhaps add a `use` for it: - `use coherence_inherent_cc_lib::TheTrait;` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/coherence/coherence_inherent_cc.rs b/src/test/ui/coherence/coherence_inherent_cc.rs index 2c980d839b9..759ada248f4 100644 --- a/src/test/ui/coherence/coherence_inherent_cc.rs +++ b/src/test/ui/coherence/coherence_inherent_cc.rs @@ -1,7 +1,4 @@ // aux-build:coherence_inherent_cc_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] // Tests that methods that implement a trait cannot be invoked // unless the trait is imported. @@ -24,8 +21,7 @@ mod NoImport { fn call_the_fn(s: &TheStruct) { s.the_fn(); - //[old]~^ ERROR no method named `the_fn` found - //[re]~^^ ERROR E0599 + //~^ ERROR E0599 } } diff --git a/src/test/ui/coherence/coherence_inherent_cc.old.stderr b/src/test/ui/coherence/coherence_inherent_cc.stderr index 3683943c5c8..c666c1a3d1b 100644 --- a/src/test/ui/coherence/coherence_inherent_cc.old.stderr +++ b/src/test/ui/coherence/coherence_inherent_cc.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_lib::TheStruct` in the current scope - --> $DIR/coherence_inherent_cc.rs:26:11 + --> $DIR/coherence_inherent_cc.rs:23:11 | LL | s.the_fn(); | ^^^^^^ method not found in `&coherence_inherent_cc_lib::TheStruct` diff --git a/src/test/ui/coherence/coherence_local.rs b/src/test/ui/coherence/coherence_local.rs index 3eab6e03ae3..ea724ada702 100644 --- a/src/test/ui/coherence/coherence_local.rs +++ b/src/test/ui/coherence/coherence_local.rs @@ -3,9 +3,6 @@ // check-pass // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_copy_like_lib as lib; diff --git a/src/test/ui/coherence/coherence_local_err_struct.re.stderr b/src/test/ui/coherence/coherence_local_err_struct.re.stderr deleted file mode 100644 index 0782f823128..00000000000 --- a/src/test/ui/coherence/coherence_local_err_struct.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence_local_err_struct.rs:17:1 - | -LL | impl lib::MyCopy for lib::MyStruct<MyType> { } - | ^^^^^^^^^^^^^^^^^^^^^--------------------- - | | | - | | `lib::MyStruct` is not defined in the current crate - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence_local_err_struct.rs b/src/test/ui/coherence/coherence_local_err_struct.rs index d6faaf2977a..a24038eb280 100644 --- a/src/test/ui/coherence/coherence_local_err_struct.rs +++ b/src/test/ui/coherence/coherence_local_err_struct.rs @@ -2,9 +2,6 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; @@ -15,8 +12,7 @@ struct MyType { x: i32 } // MyStruct is not fundamental. impl lib::MyCopy for lib::MyStruct<MyType> { } -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence_local_err_struct.old.stderr b/src/test/ui/coherence/coherence_local_err_struct.stderr index 0782f823128..0a1aee9b5c1 100644 --- a/src/test/ui/coherence/coherence_local_err_struct.old.stderr +++ b/src/test/ui/coherence/coherence_local_err_struct.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence_local_err_struct.rs:17:1 + --> $DIR/coherence_local_err_struct.rs:14:1 | LL | impl lib::MyCopy for lib::MyStruct<MyType> { } | ^^^^^^^^^^^^^^^^^^^^^--------------------- diff --git a/src/test/ui/coherence/coherence_local_err_tuple.old.stderr b/src/test/ui/coherence/coherence_local_err_tuple.old.stderr deleted file mode 100644 index f01623f7621..00000000000 --- a/src/test/ui/coherence/coherence_local_err_tuple.old.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence_local_err_tuple.rs:17:1 - | -LL | impl lib::MyCopy for (MyType,) { } - | ^^^^^^^^^^^^^^^^^^^^^--------- - | | | - | | this is not defined in the current crate because tuples are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0117`. diff --git a/src/test/ui/coherence/coherence_local_err_tuple.rs b/src/test/ui/coherence/coherence_local_err_tuple.rs index 2685b2df8cb..f4033862a3e 100644 --- a/src/test/ui/coherence/coherence_local_err_tuple.rs +++ b/src/test/ui/coherence/coherence_local_err_tuple.rs @@ -2,9 +2,6 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; @@ -15,8 +12,7 @@ struct MyType { x: i32 } // Tuples are not fundamental, so this is not a local impl. impl lib::MyCopy for (MyType,) { } -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 fn main() { } diff --git a/src/test/ui/coherence/coherence_local_err_tuple.re.stderr b/src/test/ui/coherence/coherence_local_err_tuple.stderr index f01623f7621..a4953859f77 100644 --- a/src/test/ui/coherence/coherence_local_err_tuple.re.stderr +++ b/src/test/ui/coherence/coherence_local_err_tuple.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/coherence_local_err_tuple.rs:17:1 + --> $DIR/coherence_local_err_tuple.rs:14:1 | LL | impl lib::MyCopy for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^--------- diff --git a/src/test/ui/coherence/coherence_local_ref.rs b/src/test/ui/coherence/coherence_local_ref.rs index dff684c1699..2e28839c8a4 100644 --- a/src/test/ui/coherence/coherence_local_ref.rs +++ b/src/test/ui/coherence/coherence_local_ref.rs @@ -3,9 +3,6 @@ // check-pass // aux-build:coherence_copy_like_lib.rs -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] extern crate coherence_copy_like_lib as lib; diff --git a/src/test/ui/coherence/impl-foreign-for-foreign.rs b/src/test/ui/coherence/impl-foreign-for-foreign.rs index de0b66a35eb..4c0d46045e9 100644 --- a/src/test/ui/coherence/impl-foreign-for-foreign.rs +++ b/src/test/ui/coherence/impl-foreign-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl-foreign-for-foreign.stderr b/src/test/ui/coherence/impl-foreign-for-foreign.stderr index 4d7757799e7..fe7c9b93f54 100644 --- a/src/test/ui/coherence/impl-foreign-for-foreign.stderr +++ b/src/test/ui/coherence/impl-foreign-for-foreign.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign-for-foreign.rs:12:1 + --> $DIR/impl-foreign-for-foreign.rs:10:1 | LL | impl Remote for i32 { | ^^^^^^^^^^^^^^^^--- diff --git a/src/test/ui/coherence/impl-foreign-for-foreign[foreign].rs b/src/test/ui/coherence/impl-foreign-for-foreign[foreign].rs index 5146263d991..e79f66c0e13 100644 --- a/src/test/ui/coherence/impl-foreign-for-foreign[foreign].rs +++ b/src/test/ui/coherence/impl-foreign-for-foreign[foreign].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr b/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr index 4d15f0db65f..a33cff2a4d4 100644 --- a/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr +++ b/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign-for-foreign[foreign].rs:12:1 + --> $DIR/impl-foreign-for-foreign[foreign].rs:10:1 | LL | impl Remote1<Rc<i32>> for i32 { | ^^^^^----------------^^^^^--- @@ -11,7 +11,7 @@ LL | impl Remote1<Rc<i32>> for i32 { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign-for-foreign[foreign].rs:16:1 + --> $DIR/impl-foreign-for-foreign[foreign].rs:14:1 | LL | impl Remote1<Rc<Local>> for f64 { | ^^^^^------------------^^^^^--- @@ -23,7 +23,7 @@ LL | impl Remote1<Rc<Local>> for f64 { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign-for-foreign[foreign].rs:20:1 + --> $DIR/impl-foreign-for-foreign[foreign].rs:18:1 | LL | impl<T> Remote1<Rc<T>> for f32 { | ^^^^^^^^--------------^^^^^--- diff --git a/src/test/ui/coherence/impl-foreign-for-foreign[local].rs b/src/test/ui/coherence/impl-foreign-for-foreign[local].rs index 050769dcf4c..0b1413edf37 100644 --- a/src/test/ui/coherence/impl-foreign-for-foreign[local].rs +++ b/src/test/ui/coherence/impl-foreign-for-foreign[local].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].rs b/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].rs index 03b11edf98b..10bdf2db8bb 100644 --- a/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].rs +++ b/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr b/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr index d1f4d9849ac..bd1a933b766 100644 --- a/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr +++ b/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign-for-fundamental[foreign].rs:12:1 + --> $DIR/impl-foreign-for-fundamental[foreign].rs:10:1 | LL | impl Remote for Box<i32> { | ^^^^^^^^^^^^^^^^-------- @@ -10,7 +10,7 @@ LL | impl Remote for Box<i32> { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign-for-fundamental[foreign].rs:16:1 + --> $DIR/impl-foreign-for-fundamental[foreign].rs:14:1 | LL | impl<T> Remote for Box<Rc<T>> { | ^^^^^^^^^^^^^^^^^^^---------- diff --git a/src/test/ui/coherence/impl-foreign-for-fundamental[local].rs b/src/test/ui/coherence/impl-foreign-for-fundamental[local].rs index ae03ce6a440..c3fc0e6b8a7 100644 --- a/src/test/ui/coherence/impl-foreign-for-fundamental[local].rs +++ b/src/test/ui/coherence/impl-foreign-for-fundamental[local].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl-foreign-for-local.rs b/src/test/ui/coherence/impl-foreign-for-local.rs index c9dddeba18d..04405bc46fb 100644 --- a/src/test/ui/coherence/impl-foreign-for-local.rs +++ b/src/test/ui/coherence/impl-foreign-for-local.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs b/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs index d461b5abd60..49b3abc99b7 100644 --- a/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs +++ b/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental.rs @@ -1,5 +1,4 @@ #![feature(fundamental)] -#![feature(re_rebalance_coherence)] // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs b/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs index 0a3d9e2e0e8..1e11789ef39 100644 --- a/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs +++ b/src/test/ui/coherence/impl-foreign-for-locally-defined-fundamental[foreign].rs @@ -1,5 +1,4 @@ #![feature(fundamental)] -#![feature(re_rebalance_coherence)] // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.rs b/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.rs index b08fedc5e11..99a399ddc63 100644 --- a/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.rs +++ b/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.stderr b/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.stderr index 07c7632a53f..5552d825793 100644 --- a/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.stderr +++ b/src/test/ui/coherence/impl-foreign[foreign]-for-foreign.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign[foreign]-for-foreign.rs:12:1 + --> $DIR/impl-foreign[foreign]-for-foreign.rs:10:1 | LL | impl Remote1<u32> for f64 { | ^^^^^------------^^^^^--- diff --git a/src/test/ui/coherence/impl-foreign[foreign]-for-local.rs b/src/test/ui/coherence/impl-foreign[foreign]-for-local.rs index 33e85c16476..bc6595bb340 100644 --- a/src/test/ui/coherence/impl-foreign[foreign]-for-local.rs +++ b/src/test/ui/coherence/impl-foreign[foreign]-for-local.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs b/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs index 06efb6c2ad7..0476cdaffe7 100644 --- a/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs +++ b/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr b/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr index 8dcac05c0cc..3ca40e00729 100644 --- a/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr +++ b/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:13:1 + --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:11:1 | LL | impl Remote1<Box<String>> for i32 { | ^^^^^--------------------^^^^^--- @@ -11,7 +11,7 @@ LL | impl Remote1<Box<String>> for i32 { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:17:1 + --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:15:1 | LL | impl Remote1<Box<Rc<i32>>> for f64 { | ^^^^^---------------------^^^^^--- @@ -23,7 +23,7 @@ LL | impl Remote1<Box<Rc<i32>>> for f64 { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:21:1 + --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:19:1 | LL | impl<T> Remote1<Box<Rc<T>>> for f32 { | ^^^^^^^^-------------------^^^^^--- diff --git a/src/test/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs b/src/test/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs index d47e0a36a56..7b83b048548 100644 --- a/src/test/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs +++ b/src/test/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].rs b/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].rs index db7a2ae8076..5282de4b271 100644 --- a/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].rs +++ b/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr b/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr index 7e9d3c6e729..95889022bd7 100644 --- a/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr +++ b/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl[t]-foreign-for-foreign[t].rs:13:1 + --> $DIR/impl[t]-foreign-for-foreign[t].rs:11:1 | LL | impl Remote for Rc<Local> { | ^^^^^^^^^^^^^^^^--------- @@ -10,7 +10,7 @@ LL | impl Remote for Rc<Local> { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/impl[t]-foreign-for-foreign[t].rs:18:1 + --> $DIR/impl[t]-foreign-for-foreign[t].rs:16:1 | LL | impl<T> Remote for Arc<T> { | ^^^^^^^^^^^^^^^^^^^------ diff --git a/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].rs b/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].rs index 4cc19e1a526..6f5605a2193 100644 --- a/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].rs +++ b/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr index a26b87a3262..69194bdaf56 100644 --- a/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr +++ b/src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign-for-fundamental[t].rs:12:6 + --> $DIR/impl[t]-foreign-for-fundamental[t].rs:10:6 | LL | impl<T> Remote for Box<T> { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs b/src/test/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs index 54d4bf04a58..99f3ce44760 100644 --- a/src/test/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs +++ b/src/test/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // check-pass // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs index 66a4d9d2734..81044cd0529 100644 --- a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs +++ b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr index cbead462e67..b0f34419bb3 100644 --- a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr +++ b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:12:6 + --> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:10:6 | LL | impl<T> Remote1<u32> for Box<T> { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl<T> Remote1<u32> for Box<T> { = note: only traits defined in the current crate can be implemented for a type parameter error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:16:10 + --> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:14:10 | LL | impl<'a, T> Remote1<u32> for &'a T { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.rs b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.rs index 0a67ebcbba4..680ba9f2226 100644 --- a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.rs +++ b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr index 3d9afdf6cf6..002f8b7286a 100644 --- a/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[foreign]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[foreign]-for-t.rs:10:6 | LL | impl<T> Remote1<u32> for T { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs index 71598dae96a..fc7649085c3 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr index 150b1962acb..0c43936e6d4 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-foreign.rs:12:6 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-foreign.rs:10:6 | LL | impl<T> Remote1<Box<T>> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl<T> Remote1<Box<T>> for u32 { = note: only traits defined in the current crate can be implemented for a type parameter error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-foreign.rs:16:10 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-foreign.rs:14:10 | LL | impl<'a, T> Remote1<&'a T> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs index 7bf0306f29b..703f25dd60a 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr index 0d86e74788c..f81f15b204b 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs:12:10 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs:10:10 | LL | impl<'a, T> Remote1<Box<T>> for &'a T { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl<'a, T> Remote1<Box<T>> for &'a T { = note: only traits defined in the current crate can be implemented for a type parameter error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs:15:10 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-fundamental[t].rs:13:10 | LL | impl<'a, T> Remote1<&'a T> for Box<T> { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs index 54d577c7492..ec21fdd4e04 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-local.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs index 7af929006ef..5bdab87bf4e 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr index 04ac6a868fa..24fd492c57c 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-t.rs:10:6 | LL | impl<T> Remote1<Box<T>> for T { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl<T> Remote1<Box<T>> for T { = note: only traits defined in the current crate can be implemented for a type parameter error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-t.rs:15:10 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-t.rs:13:10 | LL | impl<'a, T> Remote1<&'a T> for T { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs index 24e0f309c45..4666e449ca9 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr index f1fdcecf57d..6a1db165416 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs:12:6 + --> $DIR/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs:10:6 | LL | impl<T> Remote2<Box<T>, Local> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl<T> Remote2<Box<T>, Local> for u32 { = note: only traits defined in the current crate can be implemented for a type parameter error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs:16:10 + --> $DIR/impl[t]-foreign[fundamental[t]_local]-for-foreign.rs:14:10 | LL | impl<'a, T> Remote2<&'a T, Local> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs b/src/test/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs index 914680f191a..62e69357e3a 100644 --- a/src/test/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs +++ b/src/test/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign.rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign.rs index 81cf3c3f6ec..1fec19bbab9 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign.rs +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs index 1e84ff40c62..c8ed28be6f0 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-foreign[t].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs index ea6aa101d20..f9b88c6459b 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[foreign[t]].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs index 54425b6d708..db88c330b39 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr index 99ccbb89fc2..b5fdb16c2f3 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:12:6 + --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:10:6 | LL | impl<T> Remote1<Local> for Box<T> { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl<T> Remote1<Local> for Box<T> { = note: only traits defined in the current crate can be implemented for a type parameter error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:16:6 + --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:14:6 | LL | impl<T> Remote1<Local> for &T { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-local.rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-local.rs index 6b1d93cd944..9c14eea1be2 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-local.rs +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-local.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs index 6f35c6c9dbc..dd4110d31e6 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr index 08cf414c139..7b65212f62a 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[local]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[local]-for-t.rs:10:6 | LL | impl<T> Remote1<Local> for T { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs b/src/test/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs index be0875d0110..63c342b76f1 100644 --- a/src/test/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs +++ b/src/test/ui/coherence/impl[t]-foreign[local_fundamental[t]]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.rs b/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.rs index 5e89c207733..9bb37c2baab 100644 --- a/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.rs +++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr b/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr index e9d1ea8a815..2e5ae6a8eb3 100644 --- a/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[t]-for-foreign.rs:12:6 + --> $DIR/impl[t]-foreign[t]-for-foreign.rs:10:6 | LL | impl<T> Remote1<T> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs b/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs index 300a2c4d48a..79b5aa3fc62 100644 --- a/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs +++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr b/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr index d8b0d25a578..3976f06947f 100644 --- a/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[t]-for-fundamental.rs:12:6 + --> $DIR/impl[t]-foreign[t]-for-fundamental.rs:10:6 | LL | impl<T> Remote1<T> for Box<T> { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl<T> Remote1<T> for Box<T> { = note: only traits defined in the current crate can be implemented for a type parameter error[E0210]: type parameter `B` must be used as the type parameter for some local type (e.g., `MyStruct<B>`) - --> $DIR/impl[t]-foreign[t]-for-fundamental.rs:16:13 + --> $DIR/impl[t]-foreign[t]-for-fundamental.rs:14:13 | LL | impl<'a, A, B> Remote1<A> for &'a B { | ^ type parameter `B` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-local.rs b/src/test/ui/coherence/impl[t]-foreign[t]-for-local.rs index 769147ea7ea..bc59721c088 100644 --- a/src/test/ui/coherence/impl[t]-foreign[t]-for-local.rs +++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-local.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs // check-pass diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-t.rs b/src/test/ui/coherence/impl[t]-foreign[t]-for-t.rs index c8513380ff7..bcd6b269a38 100644 --- a/src/test/ui/coherence/impl[t]-foreign[t]-for-t.rs +++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-t.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // compile-flags:--crate-name=test // aux-build:coherence_lib.rs diff --git a/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr b/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr index 7b651e66c3d..8d858b8abee 100644 --- a/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr +++ b/src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/impl[t]-foreign[t]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[t]-for-t.rs:10:6 | LL | impl<T> Remote1<T> for T { | ^ type parameter `T` must be used as the type parameter for some local type diff --git a/src/test/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs b/src/test/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs index 3df6114f62a..d18e3f453c9 100644 --- a/src/test/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs +++ b/src/test/ui/coherence/re-rebalance-coherence-default-generic-associated-type.rs @@ -2,7 +2,6 @@ // aux-build:re_rebalance_coherence_lib-rpass.rs #![allow(dead_code)] -#![feature(re_rebalance_coherence)] // check that a generic type with a default value from an associated type can be used without // specifying the value, and without invoking coherence errors. diff --git a/src/test/ui/coherence/re-rebalance-coherence.rs b/src/test/ui/coherence/re-rebalance-coherence.rs index 33ad4e97536..38d096b08e1 100644 --- a/src/test/ui/coherence/re-rebalance-coherence.rs +++ b/src/test/ui/coherence/re-rebalance-coherence.rs @@ -1,5 +1,3 @@ -#![feature(re_rebalance_coherence)] - // run-pass // aux-build:re_rebalance_coherence_lib.rs diff --git a/src/test/ui/error-codes/e0119/complex-impl.rs b/src/test/ui/error-codes/e0119/complex-impl.rs index 3cba39ecbf9..7dbf93ada5e 100644 --- a/src/test/ui/error-codes/e0119/complex-impl.rs +++ b/src/test/ui/error-codes/e0119/complex-impl.rs @@ -6,7 +6,7 @@ use complex_impl_support::{External, M}; struct Q; -impl<R> External for (Q, R) {} //~ ERROR must be used +impl<R> External for (Q, R) {} //~ ERROR only traits defined //~^ ERROR conflicting implementations of trait fn main() {} diff --git a/src/test/ui/error-codes/e0119/complex-impl.stderr b/src/test/ui/error-codes/e0119/complex-impl.stderr index f7516d20af4..0c18a1fbd1f 100644 --- a/src/test/ui/error-codes/e0119/complex-impl.stderr +++ b/src/test/ui/error-codes/e0119/complex-impl.stderr @@ -8,15 +8,18 @@ LL | impl<R> External for (Q, R) {} - impl<'a, 'b, 'c, T, U, V, W> complex_impl_support::External for (T, complex_impl_support::M<'a, 'b, 'c, std::boxed::Box<U>, V, W>) where <U as std::ops::FnOnce<(T,)>>::Output == V, <V as std::iter::Iterator>::Item == T, 'b : 'a, T : 'a, U: std::ops::FnOnce<(T,)>, U : 'static, V: std::iter::Iterator, V: std::clone::Clone, W: std::ops::Add, <W as std::ops::Add>::Output: std::marker::Copy; -error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g., `MyStruct<R>`) - --> $DIR/complex-impl.rs:9:6 +error[E0117]: only traits defined in the current crate can be implemented for arbitrary types + --> $DIR/complex-impl.rs:9:1 | LL | impl<R> External for (Q, R) {} - | ^ type parameter `R` must be used as the type parameter for some local type + | ^^^^^^^^^^^^^^^^^^^^^------ + | | | + | | this is not defined in the current crate because tuples are always foreign + | impl doesn't use only types from inside the current crate | - = note: only traits defined in the current crate can be implemented for a type parameter + = note: define and implement a trait or new type instead error: aborting due to 2 previous errors -Some errors have detailed explanations: E0119, E0210. -For more information about an error, try `rustc --explain E0119`. +Some errors have detailed explanations: E0117, E0119. +For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/feature-gates/feature-gate-re-rebalance-coherence.rs b/src/test/ui/feature-gates/feature-gate-re-rebalance-coherence.rs deleted file mode 100644 index 505a45379cd..00000000000 --- a/src/test/ui/feature-gates/feature-gate-re-rebalance-coherence.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Test that the use of the box syntax is gated by `re-rebalance-coherence` feature gate. - -// aux-build:re_rebalance_coherence_lib.rs - -extern crate re_rebalance_coherence_lib as lib; -use lib::*; - -struct Oracle; -impl Backend for Oracle {} -impl<'a, T:'a, Tab> QueryFragment<Oracle> for BatchInsert<'a, T, Tab> {} -//~^ ERROR E0210 - -fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-re-rebalance-coherence.stderr b/src/test/ui/feature-gates/feature-gate-re-rebalance-coherence.stderr deleted file mode 100644 index 504bfb56979..00000000000 --- a/src/test/ui/feature-gates/feature-gate-re-rebalance-coherence.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) - --> $DIR/feature-gate-re-rebalance-coherence.rs:10:10 - | -LL | impl<'a, T:'a, Tab> QueryFragment<Oracle> for BatchInsert<'a, T, Tab> {} - | ^ type parameter `T` must be used as the type parameter for some local type - | - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0210`. |
