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 1e74652a890f6..0000000000000 --- 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 Trait 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/libcore/convert.rs b/src/libcore/convert.rs index 3cd2337ee59a5..e5b3af7ad55c5 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -205,11 +205,12 @@ pub trait AsMut { /// A value-to-value conversion that consumes the input value. The /// opposite of [`From`]. /// -/// One should only implement [`Into`] if a conversion to a type outside the current crate is -/// required. Otherwise one should always prefer implementing [`From`] over [`Into`] because -/// implementing [`From`] automatically provides one with a implementation of [`Into`] thanks to -/// the blanket implementation in the standard library. [`From`] cannot do these type of -/// conversions because of Rust's orphaning rules. +/// One should avoid implementing [`Into`] and implement [`From`] instead. +/// Implementing [`From`] automatically provides one with an implementation of [`Into`] +/// thanks to the blanket implementation in the standard library. +/// +/// Prefer using [`Into`] over [`From`] when specifying trait bounds on a generic function +/// to ensure that types that only implement [`Into`] can be used as well. /// /// **Note: This trait must not fail**. If the conversion can fail, use [`TryInto`]. /// @@ -218,13 +219,13 @@ pub trait AsMut { /// - [`From`]` for U` implies `Into for T` /// - [`Into`] is reflexive, which means that `Into for T` is implemented /// -/// # Implementing [`Into`] for conversions to external types +/// # Implementing [`Into`] for conversions to external types in old versions of Rust /// -/// If the destination type is not part of the current crate -/// then you can't implement [`From`] directly. +/// Prior to Rust 1.40, if the destination type was not part of the current crate +/// then you couldn't implement [`From`] directly. /// For example, take this code: /// -/// ```compile_fail +/// ``` /// struct Wrapper(Vec); /// impl From> for Vec { /// fn from(w: Wrapper) -> Vec { @@ -232,9 +233,8 @@ pub trait AsMut { /// } /// } /// ``` -/// This will fail to compile because we cannot implement a trait for a type -/// if both the trait and the type are not defined by the current crate. -/// This is due to Rust's orphaning rules. To bypass this, you can implement [`Into`] directly: +/// This will fail to compile in older versions of the language because Rust's orphaning rules +/// used to be a little bit more strict. To bypass this, you could implement [`Into`] directly: /// /// ``` /// struct Wrapper(Vec); @@ -249,9 +249,6 @@ pub trait AsMut { /// (as [`From`] does with [`Into`]). Therefore, you should always try to implement [`From`] /// and then fall back to [`Into`] if [`From`] can't be implemented. /// -/// Prefer using [`Into`] over [`From`] when specifying trait bounds on a generic function -/// to ensure that types that only implement [`Into`] can be used as well. -/// /// # Examples /// /// [`String`] implements [`Into`]`<`[`Vec`]`<`[`u8`]`>>`: diff --git a/src/librustc/traits/coherence.rs b/src/librustc/traits/coherence.rs index 49a4d17d88d03..1645f94535ff2 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 Trait 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> { - 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 Trait 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> { + 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> { - 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>> { diff --git a/src/libsyntax/feature_gate/accepted.rs b/src/libsyntax/feature_gate/accepted.rs index a1cf2d421084e..0107611460b09 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 ForeignTrait for ForeignType` is permitted. + (accepted, re_rebalance_coherence, "1.41.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 736a363bbfc0a..bde776e71cffa 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 ForeignTrait for ForeignType` 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 0541db2b8505f..0000000000000 --- 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`) - --> $DIR/coherence-all-remote.rs:9:6 - | -LL | impl Remote1 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 68c924ee27403..5c3bfee822f1c 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 Remote1 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 similarity index 91% rename from src/test/ui/coherence/coherence-all-remote.old.stderr rename to src/test/ui/coherence/coherence-all-remote.stderr index 0541db2b8505f..b35ae46f8882d 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`) - --> $DIR/coherence-all-remote.rs:9:6 + --> $DIR/coherence-all-remote.rs:6:6 | LL | impl Remote1 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 0c9abdc15e620..02945e9dade3a 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 816ad949a2bce..0000000000000 --- 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`) - --> $DIR/coherence-bigint-param.rs:11:6 - | -LL | impl Remote1 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 24106b4b348d4..c6543aaf67d53 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 Remote1 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 similarity index 91% rename from src/test/ui/coherence/coherence-bigint-param.re.stderr rename to src/test/ui/coherence/coherence-bigint-param.stderr index 816ad949a2bce..bb81d7adea243 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`) - --> $DIR/coherence-bigint-param.rs:11:6 + --> $DIR/coherence-bigint-param.rs:8:6 | LL | impl Remote1 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 38e0be0aa9ab9..a5dba90be5c59 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 a6d29048b4d8c..0000000000000 --- 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 MyTrait for T { - | -------------------------- first implementation here -... -LL | impl 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 098a13e54bfb4..93a4bc5fe7895 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 MyTrait for T { } impl 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 similarity index 98% rename from src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.old.stderr rename to src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-implemented.stderr index a6d29048b4d8c..e95826ed4d53d 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 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 1f3ddd1dc42c6..0000000000000 --- 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 MyTrait for T { - | -------------------------- first implementation here -... -LL | impl 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 5b76fc0174b30..950a08ff22452 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 MyTrait for T { } impl 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 similarity index 97% rename from src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.old.stderr rename to src/test/ui/coherence/coherence-blanket-conflicts-with-blanket-unimplemented.stderr index 1f3ddd1dc42c6..ea9838b4520e0 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 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 298ac6d1f2169..0000000000000 --- 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 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 b0aaf57e2a942..bccbac2ff1606 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 similarity index 98% rename from src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.old.stderr rename to src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr index 298ac6d1f2169..91cf925e680a3 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 94bbbdbe0a404..0000000000000 --- 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` for type `MyType`: - --> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:26:1 - | -LL | impl 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-multidispatch.rs b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.rs index 9192d123514ab..6a9db217373f9 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 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 similarity index 97% rename from src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.old.stderr rename to src/test/ui/coherence/coherence-blanket-conflicts-with-specific-multidispatch.stderr index 94bbbdbe0a404..af4f4d09d7abd 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` 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 MyTrait 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 cf799c20cb49c..0000000000000 --- 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 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 51cb10e618556..02f9217da6840 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 similarity index 86% rename from src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.old.stderr rename to src/test/ui/coherence/coherence-blanket-conflicts-with-specific-trait.stderr index cf799c20cb49c..6922f3ebffaff 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 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 0807b11a434f9..0000000000000 --- 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 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 3ecb613188ae4..5a562ff6ab937 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 similarity index 86% rename from src/test/ui/coherence/coherence-blanket-conflicts-with-specific.old.stderr rename to src/test/ui/coherence/coherence-blanket-conflicts-with-specific.stderr index 0807b11a434f9..4bc282764796b 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 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 5d310cc2c6ac5..55fa89d75070a 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 bb3641f224780..0000000000000 --- 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 Send for TestType {} - | ---------------------------------------------------- first implementation here -LL | -LL | impl !Send for TestType {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>` - -error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType`: - --> $DIR/coherence-conflicting-negative-trait-impl.rs:19:1 - | -LL | unsafe impl Send for TestType {} - | ------------------------------------------- first implementation here -LL | -LL | impl !Send for TestType {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType` - -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 e05fecb11ed4b..66d0958e4c9a4 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(::std::marker::PhantomData); unsafe impl Send for TestType {} impl !Send for TestType {} -//[old]~^ ERROR conflicting implementations of trait `std::marker::Send` -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 unsafe impl Send for TestType {} impl !Send for TestType {} -//[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 similarity index 87% rename from src/test/ui/coherence/coherence-conflicting-negative-trait-impl.re.stderr rename to src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr index bb3641f224780..0a8bbc4bc50a8 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 Send for TestType {} | ---------------------------------------------------- first implementation here @@ -8,7 +8,7 @@ LL | impl !Send for TestType {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>` error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType`: - --> $DIR/coherence-conflicting-negative-trait-impl.rs:19:1 + --> $DIR/coherence-conflicting-negative-trait-impl.rs:15:1 | LL | unsafe impl Send for TestType {} | ------------------------------------------- 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 1cf039f0831f5..bb95c59d183f9 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 d3f8ba63f07eb..0000000000000 --- 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`) - --> $DIR/coherence-cow.rs:18:6 - | -LL | impl Remote for Pair> { } - | ^ 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 d8db025cbcf27..0000000000000 --- 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`) - --> $DIR/coherence-cow.rs:23:6 - | -LL | impl Remote for Pair,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 ff46d7ea28032..0000000000000 --- 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`) - --> $DIR/coherence-cow.rs:28:6 - | -LL | impl Remote for Pair,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 146232ac02b0f..39f211eff3615 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 Remote for Pair,T> { } | ^^^^^^^^^^^^^^^^^^^---------------- diff --git a/src/test/ui/coherence/coherence-cow.re_c.stderr b/src/test/ui/coherence/coherence-cow.re_c.stderr index e0cf6aab7bbde..94bb0d2166c3a 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 Remote for Pair,U> { } | ^^^^^^^^^^^^^^^^^^^^^---------------- diff --git a/src/test/ui/coherence/coherence-cow.rs b/src/test/ui/coherence/coherence-cow.rs index 956b073414861..86a8d0963b84b 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); -#[cfg(any(a, re_a))] +#[cfg(any(re_a))] impl Remote for Pair> { } -//[a]~^ ERROR E0210 -//[re_a]~^^ ERROR E0117 +//[re_a]~^ ERROR E0117 -#[cfg(any(b, re_b))] +#[cfg(any(re_b))] impl Remote for Pair,T> { } -//[b]~^ ERROR E0210 -//[re_b]~^^ ERROR E0117 +//[re_b]~^ ERROR E0117 -#[cfg(any(c, re_c))] +#[cfg(any(re_c))] impl Remote for Pair,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 971abe29639ff..0000000000000 --- 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 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`) - --> $DIR/coherence-cross-crate-conflict.rs:12:6 - | -LL | impl 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 9643ab643dfe5..648e290a4b888 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 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 similarity index 88% rename from src/test/ui/coherence/coherence-cross-crate-conflict.old.stderr rename to src/test/ui/coherence/coherence-cross-crate-conflict.stderr index 971abe29639ff..cb66f9b0c7ff9 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 Foo for A { | ^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | impl 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`) - --> $DIR/coherence-cross-crate-conflict.rs:12:6 + --> $DIR/coherence-cross-crate-conflict.rs:9:6 | LL | impl 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 3f644e3a6e7fa..0000000000000 --- 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 606b4947b5f09..db24662e2d5ad 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 similarity index 82% rename from src/test/ui/coherence/coherence-default-trait-impl.old.stderr rename to src/test/ui/coherence/coherence-default-trait-impl.stderr index 3f644e3a6e7fa..f6a163268a14a 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 b81f75533176f..0000000000000 --- 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 60b88fb80e44f..909214c1b6e37 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 similarity index 84% rename from src/test/ui/coherence/coherence-error-suppression.old.stderr rename to src/test/ui/coherence/coherence-error-suppression.stderr index b81f75533176f..aadc80cb1c3ea 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 a3da52fe484ac..0000000000000 --- 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 {} - | ^^^^^^^^^^^^^^---------------------- - | | | - | | `dyn coherence_fundamental_trait_lib::Fundamental` 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 0c7d54425ddc4..dd127bf7f4bff 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 {} -//[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 similarity index 90% rename from src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr rename to src/test/ui/coherence/coherence-fundamental-trait-objects.stderr index a3da52fe484ac..06cfdeb39076e 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 {} | ^^^^^^^^^^^^^^---------------------- diff --git a/src/test/ui/coherence/coherence-impl-in-fn.rs b/src/test/ui/coherence/coherence-impl-in-fn.rs index 09e2c1e5a4edd..b97197317488c 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 18a7cea95bdb9..0000000000000 --- 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 b4c88e937830e..20ff875491ff4 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 similarity index 88% rename from src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.old.stderr rename to src/test/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr index 18a7cea95bdb9..ed6be60de460c 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 4819ce9260e70..0000000000000 --- 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 3ce3dca0660b9..195a37f15a47e 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 similarity index 88% rename from src/test/ui/coherence/coherence-impl-trait-for-trait.old.stderr rename to src/test/ui/coherence/coherence-impl-trait-for-trait.stderr index 4819ce9260e70..cf0b38c5bb8b6 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 742845b190737..0000000000000 --- 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 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 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 97133bc33ce0d..dec40f9dd40aa 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 similarity index 88% rename from src/test/ui/coherence/coherence-impls-copy.old.stderr rename to src/test/ui/coherence/coherence-impls-copy.stderr index 742845b190737..be040b38d6bf6 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 7584b01ca8930..0000000000000 --- 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 ef13e9caa6678..b2a9c5be65843 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 similarity index 93% rename from src/test/ui/coherence/coherence-impls-send.old.stderr rename to src/test/ui/coherence/coherence-impls-send.stderr index 7584b01ca8930..a5b3c7657bdfe 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 ef999bcf461bc..0000000000000 --- 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 84ae2dd291b60..19e7349c507ef 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 similarity index 91% rename from src/test/ui/coherence/coherence-impls-sized.old.stderr rename to src/test/ui/coherence/coherence-impls-sized.stderr index ef999bcf461bc..3b0a9fc60a2e0 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 a2fa49acd2c90..0000000000000 --- 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 { 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 { 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 5a6b8fb7316d8..7f0e5472c3c2e 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 { type Assoc; } -//[old]~^ cycle detected -//[re]~^^ ERROR E0391 +//~^ ERROR E0391 impl Trait for Vec { 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 similarity index 78% rename from src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.old.stderr rename to src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index a2fa49acd2c90..e5cc298a4355d 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 { 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 { 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 051cc280b2d12..43a0a5c427774 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 df6e808f7dec5..386fe40ac3ca8 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 731752045cd34..0000000000000 --- 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`) - --> $DIR/coherence-lone-type-parameter.rs:9:6 - | -LL | impl 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 63b38bf1cc138..5368fef76d0b4 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 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 similarity index 90% rename from src/test/ui/coherence/coherence-lone-type-parameter.old.stderr rename to src/test/ui/coherence/coherence-lone-type-parameter.stderr index 731752045cd34..3791d96302bc2 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`) - --> $DIR/coherence-lone-type-parameter.rs:9:6 + --> $DIR/coherence-lone-type-parameter.rs:6:6 | LL | impl 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 6a816664c4832..fa1d4bbb49665 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 98b04489ac4de..695a71cbd2d7c 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 7ed47dca4972d..0000000000000 --- 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 b6658d5bfa414..45c478ecc0362 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 similarity index 82% rename from src/test/ui/coherence/coherence-negative-impls-safe.old.stderr rename to src/test/ui/coherence/coherence-negative-impls-safe.stderr index 7ed47dca4972d..c47c9d25e3614 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 81465e7185676..0000000000000 --- 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 MyTrait for T {} - | --------------------- first implementation here -LL | impl 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 9717f1ed0510e..d466dcac1c48c 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 MyTrait for T {} impl 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 similarity index 86% rename from src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.old.stderr rename to src/test/ui/coherence/coherence-no-direct-lifetime-dispatch.stderr index 81465e7185676..a74ffbb3afd96 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 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 a353acf0679dc..0000000000000 --- 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 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 { } - | ^^^^^^^^^^^^^^^---------- - | | | - | | `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 18f50e46021f9..a7b48825d7c02 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 for isize { } -//[old]~^ ERROR E0117 -//[re]~^^ ERROR E0117 +//~^ ERROR E0117 impl TheTrait for isize { } impl TheTrait for TheType { } impl !Send for Vec { } -//[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 similarity index 93% rename from src/test/ui/coherence/coherence-orphan.old.stderr rename to src/test/ui/coherence/coherence-orphan.stderr index a353acf0679dc..fb518f8ecba2d 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 for isize { } | ^^^^^---------------^^^^^----- @@ -11,7 +11,7 @@ LL | impl TheTrait 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 { } | ^^^^^^^^^^^^^^^---------- 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 c7f85b0b59078..0000000000000 --- 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 From for T { - | ---------------------- first implementation here -... -LL | impl 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 bf3ce89f70bba..574a16a191156 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 { fn foo() {} } @@ -18,8 +14,7 @@ impl From for T { } impl 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 similarity index 88% rename from src/test/ui/coherence/coherence-overlap-all-t-and-tuple.old.stderr rename to src/test/ui/coherence/coherence-overlap-all-t-and-tuple.stderr index c7f85b0b59078..5e8bfbcc3cafa 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 From 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 dcfc017f1b038..0000000000000 --- 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 Sweet { fn dummy(&self) { } } - | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... -LL | impl Sweet { fn dummy(&self) { } } - | ------------------- other definition for `dummy` - -error[E0592]: duplicate definitions with name `f` - --> $DIR/coherence-overlap-downstream-inherent.rs:18:38 - | -LL | impl A where T: Bar { fn f(&self) {} } - | ^^^^^^^^^^^^^^ duplicate definitions for `f` -... -LL | impl A { 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 ad54d247f918d..5dea33e330b62 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); pub trait Sugar {} pub trait Fruit {} impl Sweet { fn dummy(&self) { } } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl Sweet { fn dummy(&self) { } } trait Bar {} struct A(T, X); impl A where T: Bar { fn f(&self) {} } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl A { 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 similarity index 86% rename from src/test/ui/coherence/coherence-overlap-downstream-inherent.old.stderr rename to src/test/ui/coherence/coherence-overlap-downstream-inherent.stderr index dcfc017f1b038..4cb7390453c88 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 Sweet { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... +LL | LL | impl Sweet { 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 A where T: Bar { fn f(&self) {} } | ^^^^^^^^^^^^^^ duplicate definitions for `f` -... +LL | LL | impl A { 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 b4847c03d4179..0000000000000 --- 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 Sweet for T { } - | ------------------------- first implementation here -LL | impl Sweet for T { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`: - --> $DIR/coherence-overlap-downstream.rs:19:1 - | -LL | impl Foo for T where T: Bar {} - | --------------------------------------- first implementation here -LL | impl Foo 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 c6ced7b80fd9d..738ec0e3d4550 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 Sweet for T { } impl Sweet for T { } -//[old]~^ ERROR E0119 -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 pub trait Foo {} pub trait Bar {} impl Foo for T where T: Bar {} impl Foo 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 similarity index 88% rename from src/test/ui/coherence/coherence-overlap-downstream.old.stderr rename to src/test/ui/coherence/coherence-overlap-downstream.stderr index b4847c03d4179..6fb398562d6be 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 Sweet for T { } | ------------------------- first implementation here @@ -7,7 +7,7 @@ LL | impl 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 Foo for T where T: Bar {} | --------------------------------------- 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 6fd9307754033..0000000000000 --- 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 Cake { fn dummy(&self) { } } - | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... -LL | impl Cake> { 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 969366e29cc35..a272e620fcab3 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); impl Cake { fn dummy(&self) { } } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl Cake> { 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 similarity index 89% rename from src/test/ui/coherence/coherence-overlap-issue-23516-inherent.old.stderr rename to src/test/ui/coherence/coherence-overlap-issue-23516-inherent.stderr index 6fd9307754033..e63f8a997af67 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 Cake { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... +LL | LL | impl Cake> { 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 d17d67adf0eae..0000000000000 --- 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 Sweet for T { } - | ------------------------- first implementation here -LL | impl Sweet for Box { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 e3c15e149f8b5..63e42e8f412dd 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 Sweet for T { } impl Sweet for Box { } -//[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 similarity index 91% rename from src/test/ui/coherence/coherence-overlap-issue-23516.old.stderr rename to src/test/ui/coherence/coherence-overlap-issue-23516.stderr index d17d67adf0eae..fe4c5cf3490dd 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 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 429e67573b59b..0000000000000 --- 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 Foo for T {} - | ----------------- first implementation here -LL | impl 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 Bar for (T, u8) {} - | ----------------------- first implementation here -LL | impl Bar for (u8, T) {} - | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)` - -error[E0119]: conflicting implementations of trait `Baz` for type `u8`: - --> $DIR/coherence-overlap-messages.rs:23:1 - | -LL | impl Baz for T {} - | --------------------- first implementation here -LL | impl Baz for u8 {} - | ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8` - -error[E0119]: conflicting implementations of trait `Quux<_, _>`: - --> $DIR/coherence-overlap-messages.rs:30:1 - | -LL | impl Quux for T {} - | ------------------------------ first implementation here -LL | impl Quux for T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation - -error[E0119]: conflicting implementations of trait `Quux<_, _>`: - --> $DIR/coherence-overlap-messages.rs:33:1 - | -LL | impl Quux for T {} - | ------------------------------ first implementation here -... -LL | impl Quux 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 e0e2e672e98dd..1258a2371142f 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 Foo for T {} impl Foo for U {} -//[old]~^ ERROR conflicting implementations of trait `Foo`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 trait Bar { fn bar() {} } impl Bar for (T, u8) {} impl Bar for (u8, T) {} -//[old]~^ ERROR conflicting implementations of trait `Bar` for type `(u8, u8)`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 trait Baz { fn baz() {} } impl Baz for T {} impl Baz for u8 {} -//[old]~^ ERROR conflicting implementations of trait `Baz` for type `u8`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 trait Quux { fn quux() {} } impl Quux for T {} impl Quux for T {} -//[old]~^ ERROR conflicting implementations of trait `Quux<_, _>`: -//[re]~^^ ERROR E0119 +//~^ ERROR E0119 impl Quux 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 similarity index 88% rename from src/test/ui/coherence/coherence-overlap-messages.old.stderr rename to src/test/ui/coherence/coherence-overlap-messages.stderr index 429e67573b59b..28147f52fa614 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 Foo for T {} | ----------------- first implementation here @@ -7,7 +7,7 @@ LL | impl 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 Bar for (T, u8) {} | ----------------------- first implementation here @@ -15,7 +15,7 @@ LL | impl Bar for (u8, T) {} | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)` error[E0119]: conflicting implementations of trait `Baz` for type `u8`: - --> $DIR/coherence-overlap-messages.rs:23:1 + --> $DIR/coherence-overlap-messages.rs:17:1 | LL | impl Baz for T {} | --------------------- first implementation here @@ -23,7 +23,7 @@ LL | impl Baz 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 Quux for T {} | ------------------------------ first implementation here @@ -31,7 +31,7 @@ LL | impl Quux 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 Quux 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 3a3e1a4afc3bb..0000000000000 --- 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 A where T: Remote { fn dummy(&self) { } } - | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... -LL | impl A { 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 92b619af076b9..082d753debbe1 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); impl A where T: Remote { fn dummy(&self) { } } -//[old]~^ ERROR E0592 -//[re]~^^ ERROR E0592 +//~^ ERROR E0592 impl A { 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 similarity index 89% rename from src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr rename to src/test/ui/coherence/coherence-overlap-upstream-inherent.stderr index 3a3e1a4afc3bb..51316f249756c 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 A where T: Remote { fn dummy(&self) { } } | ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy` -... +LL | LL | impl A { 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 bd6f59f346b6d..0000000000000 --- 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 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 62f675003f9c4..8f1e6558b15eb 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 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 similarity index 91% rename from src/test/ui/coherence/coherence-overlap-upstream.old.stderr rename to src/test/ui/coherence/coherence-overlap-upstream.stderr index bd6f59f346b6d..8d3de9a243e8e 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 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 7c62716f7058c..0000000000000 --- 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`) - --> $DIR/coherence-overlapping-pairs.rs:11:6 - | -LL | impl Remote for lib::Pair { } - | ^ 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 de31a0839405d..d5d18217bd6a5 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 Remote for lib::Pair { } -//[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 similarity index 91% rename from src/test/ui/coherence/coherence-overlapping-pairs.re.stderr rename to src/test/ui/coherence/coherence-overlapping-pairs.stderr index 2277b33fcebee..69a4627a7b86a 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 Remote for lib::Pair { } | ^^^^^^^^^^^^^^^^^^^---------------- 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 9f55df4c974b8..0000000000000 --- 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`) - --> $DIR/coherence-pair-covered-uncovered-1.rs:15:6 - | -LL | impl Remote1>> 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 91794b7999b1c..15868ca868610 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); impl Remote1>> 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 similarity index 92% rename from src/test/ui/coherence/coherence-pair-covered-uncovered-1.re.stderr rename to src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr index f6e755b666249..f6b9869e177d2 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 Remote1>> 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 4084061eb4ac5..0000000000000 --- 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`) - --> $DIR/coherence-pair-covered-uncovered.rs:11:6 - | -LL | impl Remote for Pair> { } - | ^ 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 49a91412bec71..da970572fdee2 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); impl Remote for Pair> { } -//[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 similarity index 91% rename from src/test/ui/coherence/coherence-pair-covered-uncovered.re.stderr rename to src/test/ui/coherence/coherence-pair-covered-uncovered.stderr index 9fa860cb584a1..d1a4993e0f257 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 Remote for Pair> { } | ^^^^^^^^^^^^^^^^^^^^^---------------- 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 728eae5e547da..0000000000000 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `Foo` for type `i32`: - --> $DIR/coherence-projection-conflict-orphan.rs:19:1 - | -LL | impl Foo for i32 { } - | --------------------- first implementation here -LL | -LL | impl Foo 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 4f7fc71536ba8..637dd250638bb 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 for i32 { } impl Foo 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 similarity index 90% rename from src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr rename to src/test/ui/coherence/coherence-projection-conflict-orphan.stderr index 728eae5e547da..06a840255bd9a 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` for type `i32`: - --> $DIR/coherence-projection-conflict-orphan.rs:19:1 + --> $DIR/coherence-projection-conflict-orphan.rs:16:1 | LL | impl Foo 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 b53a4c973edac..0000000000000 --- 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 > Foo

for Option {} - | ---------------------------------------- first implementation here -LL | -LL | impl Foo for Option { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 819947fa54756..3e4141fa8cb1e 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

` or not // for the second impl. -// revisions: old re - -#![cfg_attr(re, feature(re_rebalance_coherence))] - use std::marker::PhantomData; pub trait Foo

{ fn foo() {} } @@ -12,7 +8,6 @@ pub trait Foo

{ fn foo() {} } impl > Foo

for Option {} impl Foo for Option { } -//[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 similarity index 88% rename from src/test/ui/coherence/coherence-projection-conflict-ty-param.old.stderr rename to src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr index b53a4c973edac..c5c9b0ac33c2a 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 > Foo

for Option {} | ---------------------------------------- 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 c2e5fc8617512..0000000000000 --- a/src/test/ui/coherence/coherence-projection-conflict.re.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `Foo` for type `i32`: - --> $DIR/coherence-projection-conflict.rs:15:1 - | -LL | impl Foo for i32 { } - | --------------------- first implementation here -LL | -LL | impl Foo 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 4086aeef8c03a..daab2a2f8b403 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

{ fn foo() {} } @@ -13,8 +9,7 @@ pub trait Bar { impl Foo for i32 { } impl Foo 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 similarity index 89% rename from src/test/ui/coherence/coherence-projection-conflict.old.stderr rename to src/test/ui/coherence/coherence-projection-conflict.stderr index c2e5fc8617512..aed6910b52909 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` for type `i32`: - --> $DIR/coherence-projection-conflict.rs:15:1 + --> $DIR/coherence-projection-conflict.rs:11:1 | LL | impl Foo 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 b34c31dcddb3d..42b4b1912e225 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

{} diff --git a/src/test/ui/coherence/coherence-projection-ok.rs b/src/test/ui/coherence/coherence-projection-ok.rs index f4f5ca64de738..44fc02a5c20e7 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

{} diff --git a/src/test/ui/coherence/coherence-rfc447-constrained.rs b/src/test/ui/coherence/coherence-rfc447-constrained.rs index 4da54d386fd35..9d1d86883259f 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 a0ff580671a20..a742bf2884e3c 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 e832bdebbddeb..0000000000000 --- 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 MyTrait for (T,T) { - | ------------------------- first implementation here -... -LL | impl 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 130867b22428b..8cc829726681f 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 MyTrait for (T,T) { } impl 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 similarity index 89% rename from src/test/ui/coherence/coherence-tuple-conflict.old.stderr rename to src/test/ui/coherence/coherence-tuple-conflict.stderr index e832bdebbddeb..f6c2bc32aa870 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 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 fbcf8fb762a01..0000000000000 --- 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`) - --> $DIR/coherence-vec-local-2.rs:14:6 - | -LL | impl Remote for Vec> { } - | ^ 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 423543964c20b..47df06bac6c14 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); impl Remote for Vec> { } -//[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 similarity index 92% rename from src/test/ui/coherence/coherence-vec-local-2.re.stderr rename to src/test/ui/coherence/coherence-vec-local-2.stderr index 48a2848c55f1b..198314d5ce524 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 Remote for Vec> { } | ^^^^^^^^^^^^^^^^^^^------------- 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 4b199dd914217..0000000000000 --- 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 { } - | ^^^^^^^^^^^^^^^^---------- - | | | - | | `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 351ddd2aa6744..130cc39d0af81 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 { } -//[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 similarity index 92% rename from src/test/ui/coherence/coherence-vec-local.re.stderr rename to src/test/ui/coherence/coherence-vec-local.stderr index 4b199dd914217..dc5a0a6895979 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 { } | ^^^^^^^^^^^^^^^^---------- diff --git a/src/test/ui/coherence/coherence-where-clause.rs b/src/test/ui/coherence/coherence-where-clause.rs index 283974203858d..5c40def86bba0 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 653f76264c110..92af341ccb529 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 22517f9da2e30..edee6cd7b6cf6 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 0d677800f7949..599c804d213db 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 4d9f55c121547..0000000000000 --- 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 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 2a61042c6a03a..7d851b5288457 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 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 similarity index 99% rename from src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr rename to src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr index 4d9f55c121547..cf6c6fb8c7a9d 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 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 f0bcf659bb696..0000000000000 --- 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`: - --> $DIR/coherence_copy_like_err_struct.rs:22:1 - | -LL | impl MyTrait for T { } - | ---------------------------------- first implementation here -... -LL | impl MyTrait for lib::MyStruct { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct` - | - = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyStruct` 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 38fc2e662d71e..fe39370c9017e 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 MyTrait for T { } // // which we cannot approve. impl MyTrait for lib::MyStruct { } -//[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 similarity index 92% rename from src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr rename to src/test/ui/coherence/coherence_copy_like_err_struct.stderr index f0bcf659bb696..cf79e851bf4ab 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`: - --> $DIR/coherence_copy_like_err_struct.rs:22:1 + --> $DIR/coherence_copy_like_err_struct.rs:19:1 | LL | impl 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 a40153af2cf30..0000000000000 --- 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 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 7234bed1ba0d0..f63e205c9f82b 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 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 similarity index 91% rename from src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr rename to src/test/ui/coherence/coherence_copy_like_err_tuple.stderr index a40153af2cf30..52f66427dfae4 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 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 e71547cb89f9c..0000000000000 --- 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 f0d3682adb8ca..f3ebf00038698 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 similarity index 92% rename from src/test/ui/coherence/coherence_inherent.old.stderr rename to src/test/ui/coherence/coherence_inherent.stderr index e71547cb89f9c..e719d5254f639 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 3683943c5c819..0000000000000 --- 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 2c980d839b94b..759ada248f47c 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 similarity index 92% rename from src/test/ui/coherence/coherence_inherent_cc.old.stderr rename to src/test/ui/coherence/coherence_inherent_cc.stderr index 3683943c5c819..c666c1a3d1b3f 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 3eab6e03ae3e2..ea724ada7025b 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 0782f82312872..0000000000000 --- 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 { } - | ^^^^^^^^^^^^^^^^^^^^^--------------------- - | | | - | | `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 d6faaf2977a76..a24038eb28075 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 { } -//[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 similarity index 92% rename from src/test/ui/coherence/coherence_local_err_struct.old.stderr rename to src/test/ui/coherence/coherence_local_err_struct.stderr index 0782f82312872..0a1aee9b5c18e 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 { } | ^^^^^^^^^^^^^^^^^^^^^--------------------- 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 f01623f76217e..0000000000000 --- 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 2685b2df8cb65..f4033862a3eb9 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 similarity index 92% rename from src/test/ui/coherence/coherence_local_err_tuple.re.stderr rename to src/test/ui/coherence/coherence_local_err_tuple.stderr index f01623f76217e..a4953859f77fd 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 dff684c1699af..2e28839c8a416 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 de0b66a35eb01..4c0d46045e959 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 4d7757799e7cd..fe7c9b93f5401 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 5146263d99114..e79f66c0e1320 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 4d15f0db65ffb..a33cff2a4d4ec 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> for i32 { | ^^^^^----------------^^^^^--- @@ -11,7 +11,7 @@ LL | impl Remote1> 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> for f64 { | ^^^^^------------------^^^^^--- @@ -23,7 +23,7 @@ LL | impl Remote1> 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 Remote1> 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 050769dcf4ce8..0b1413edf3789 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 03b11edf98b41..10bdf2db8bbff 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 d1f4d9849ac31..bd1a933b7668e 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 { | ^^^^^^^^^^^^^^^^-------- @@ -10,7 +10,7 @@ LL | impl Remote for Box { = 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 Remote for Box> { | ^^^^^^^^^^^^^^^^^^^---------- 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 ae03ce6a440dc..c3fc0e6b8a7c5 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 c9dddeba18dc5..04405bc46fbcc 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 d461b5abd60ff..49b3abc99b731 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 0a3d9e2e0e89c..1e11789ef398d 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 b08fedc5e11c2..99a399ddc632d 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 07c7632a53ff4..5552d82579371 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 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 33e85c164763e..bc6595bb34082 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 06efb6c2ad75e..0476cdaffe77e 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 8dcac05c0ccb6..3ca40e007292c 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> for i32 { | ^^^^^--------------------^^^^^--- @@ -11,7 +11,7 @@ LL | impl Remote1> 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>> for f64 { | ^^^^^---------------------^^^^^--- @@ -23,7 +23,7 @@ LL | impl Remote1>> 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 Remote1>> 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 d47e0a36a5659..7b83b048548eb 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 db7a2ae8076a3..5282de4b2710c 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 7e9d3c6e72927..95889022bd7a1 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 { | ^^^^^^^^^^^^^^^^--------- @@ -10,7 +10,7 @@ LL | impl Remote for Rc { = 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 Remote for Arc { | ^^^^^^^^^^^^^^^^^^^------ 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 4cc19e1a526ca..6f5605a21938e 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 a26b87a326211..69194bdaf569b 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`) - --> $DIR/impl[t]-foreign-for-fundamental[t].rs:12:6 + --> $DIR/impl[t]-foreign-for-fundamental[t].rs:10:6 | LL | impl Remote for Box { | ^ 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 54d4bf04a583c..99f3ce4476043 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 66a4d9d273469..81044cd0529af 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 cbead462e6790..b0f34419bb39d 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`) - --> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:12:6 + --> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:10:6 | LL | impl Remote1 for Box { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl Remote1 for Box { = 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`) - --> $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 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 0a67ebcbba44c..680ba9f2226f7 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 3d9afdf6cf605..002f8b7286a2c 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`) - --> $DIR/impl[t]-foreign[foreign]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[foreign]-for-t.rs:10:6 | LL | impl Remote1 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 71598dae96ab3..fc7649085c368 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 150b1962acb84..0c43936e6d401 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`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-foreign.rs:12:6 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-foreign.rs:10:6 | LL | impl Remote1> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl Remote1> 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`) - --> $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 7bf0306f29ba4..703f25dd60a62 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 0d86e74788cf8..f81f15b204b9c 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`) - --> $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> 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> 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`) - --> $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 { | ^ 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 54d577c749248..ec21fdd4e04bc 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 7af929006ef7f..5bdab87bf4e00 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 04ac6a868fa1a..24fd492c57c1e 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`) - --> $DIR/impl[t]-foreign[fundamental[t]]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[fundamental[t]]-for-t.rs:10:6 | LL | impl Remote1> for T { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl Remote1> 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`) - --> $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 24e0f309c4555..4666e449ca98f 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 f1fdcecf57df8..6a1db165416bd 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`) - --> $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 Remote2, Local> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl Remote2, 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`) - --> $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 914680f191ac9..62e69357e3a2d 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 81cf3c3f6eca9..1fec19bbab918 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 1e84ff40c6227..c8ed28be6f0cc 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 ea6aa101d209c..f9b88c6459bdd 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 54425b6d708aa..db88c330b39e1 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 99ccbb89fc2fc..b5fdb16c2f35d 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`) - --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:12:6 + --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:10:6 | LL | impl Remote1 for Box { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl Remote1 for Box { = 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`) - --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:16:6 + --> $DIR/impl[t]-foreign[local]-for-fundamental[t].rs:14:6 | LL | impl Remote1 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 6b1d93cd94442..9c14eea1be22b 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 6f35c6c9dbc88..dd4110d31e6f5 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 08cf414c139af..7b65212f62a4d 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`) - --> $DIR/impl[t]-foreign[local]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[local]-for-t.rs:10:6 | LL | impl Remote1 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 be0875d0110fd..63c342b76f186 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 5e89c2077330a..9bb37c2baab8a 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 e9d1ea8a81575..2e5ae6a8eb312 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`) - --> $DIR/impl[t]-foreign[t]-for-foreign.rs:12:6 + --> $DIR/impl[t]-foreign[t]-for-foreign.rs:10:6 | LL | impl Remote1 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 300a2c4d48a9c..79b5aa3fc6202 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 d8b0d25a5782b..3976f06947f43 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`) - --> $DIR/impl[t]-foreign[t]-for-fundamental.rs:12:6 + --> $DIR/impl[t]-foreign[t]-for-fundamental.rs:10:6 | LL | impl Remote1 for Box { | ^ type parameter `T` must be used as the type parameter for some local type @@ -7,7 +7,7 @@ LL | impl Remote1 for Box { = 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`) - --> $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 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 769147ea7eabd..bc59721c08872 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 c8513380ff73e..bcd6b269a382a 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 7b651e66c3dcb..8d858b8abeedf 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`) - --> $DIR/impl[t]-foreign[t]-for-t.rs:12:6 + --> $DIR/impl[t]-foreign[t]-for-t.rs:10:6 | LL | impl Remote1 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 3df6114f62a5a..d18e3f453c914 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 33ad4e9753661..38d096b08e148 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 3cba39ecbf938..7dbf93ada5e5b 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 External for (Q, R) {} //~ ERROR must be used +impl 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 f7516d20af472..0c18a1fbd1fd2 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 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, V, W>) where >::Output == V, ::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, ::Output: std::marker::Copy; -error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g., `MyStruct`) - --> $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 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 505a45379cdca..0000000000000 --- 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 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 504bfb5697960..0000000000000 --- 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`) - --> $DIR/feature-gate-re-rebalance-coherence.rs:10:10 - | -LL | impl<'a, T:'a, Tab> QueryFragment 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`.