diff --git a/compiler/rustc_hir_analysis/locales/en-US.ftl b/compiler/rustc_hir_analysis/locales/en-US.ftl index 1d313945b52..dfd083442ae 100644 --- a/compiler/rustc_hir_analysis/locales/en-US.ftl +++ b/compiler/rustc_hir_analysis/locales/en-US.ftl @@ -89,14 +89,14 @@ hir_analysis_missing_type_params = .note = because of the default `Self` reference, type parameters must be specified on object types hir_analysis_copy_impl_on_type_with_dtor = - the trait `Copy` may not be implemented for this type; the type has a destructor + the trait `Copy` cannot be implemented for this type; the type has a destructor .label = `Copy` not allowed on types with destructors hir_analysis_multiple_relaxed_default_bounds = type parameter has more than one relaxed default bound, only one is supported hir_analysis_copy_impl_on_non_adt = - the trait `Copy` may not be implemented for this type + the trait `Copy` cannot be implemented for this type .label = type is not a structure or enumeration hir_analysis_const_impl_for_non_const_trait = diff --git a/compiler/rustc_hir_analysis/src/coherence/builtin.rs b/compiler/rustc_hir_analysis/src/coherence/builtin.rs index ffb68abf978..852c5768399 100644 --- a/compiler/rustc_hir_analysis/src/coherence/builtin.rs +++ b/compiler/rustc_hir_analysis/src/coherence/builtin.rs @@ -86,7 +86,7 @@ fn visit_implementation_of_copy(tcx: TyCtxt<'_>, impl_did: LocalDefId) { tcx.sess, span, E0204, - "the trait `Copy` may not be implemented for this type" + "the trait `Copy` cannot be implemented for this type" ); // We'll try to suggest constraining type parameters to fulfill the requirements of diff --git a/compiler/rustc_hir_typeck/locales/en-US.ftl b/compiler/rustc_hir_typeck/locales/en-US.ftl index adfcbc36a4d..2c537bf4064 100644 --- a/compiler/rustc_hir_typeck/locales/en-US.ftl +++ b/compiler/rustc_hir_typeck/locales/en-US.ftl @@ -4,14 +4,14 @@ hir_typeck_field_multiply_specified_in_initializer = .previous_use_label = first use of `{$ident}` hir_typeck_copy_impl_on_type_with_dtor = - the trait `Copy` may not be implemented for this type; the type has a destructor + the trait `Copy` cannot be implemented for this type; the type has a destructor .label = `Copy` not allowed on types with destructors hir_typeck_multiple_relaxed_default_bounds = type parameter has more than one relaxed default bound, only one is supported hir_typeck_copy_impl_on_non_adt = - the trait `Copy` may not be implemented for this type + the trait `Copy` cannot be implemented for this type .label = type is not a structure or enumeration hir_typeck_trait_object_declared_with_no_traits = diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 520ae0edb09..427146941ad 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -324,7 +324,7 @@ pub trait StructuralEq { /// attempt to derive a `Copy` implementation, we'll get an error: /// /// ```text -/// the trait `Copy` may not be implemented for this type; field `points` does not implement `Copy` +/// the trait `Copy` cannot be implemented for this type; field `points` does not implement `Copy` /// ``` /// /// Shared references (`&T`) are also `Copy`, so a type can be `Copy`, even when it holds diff --git a/tests/ui/coherence/coherence-impls-copy.stderr b/tests/ui/coherence/coherence-impls-copy.stderr index d40ffc48a29..21dbc606321 100644 --- a/tests/ui/coherence/coherence-impls-copy.stderr +++ b/tests/ui/coherence/coherence-impls-copy.stderr @@ -52,19 +52,19 @@ LL | impl Copy for [MyType] {} | = note: define and implement a trait or new type instead -error[E0206]: the trait `Copy` may not be implemented for this type +error[E0206]: the trait `Copy` cannot be implemented for this type --> $DIR/coherence-impls-copy.rs:21: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 +error[E0206]: the trait `Copy` cannot be implemented for this type --> $DIR/coherence-impls-copy.rs:25: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 +error[E0206]: the trait `Copy` cannot be implemented for this type --> $DIR/coherence-impls-copy.rs:30:15 | LL | impl Copy for [MyType] {} diff --git a/tests/ui/coherence/deep-bad-copy-reason.rs b/tests/ui/coherence/deep-bad-copy-reason.rs index 80bbe387ac7..97fd3f719bf 100644 --- a/tests/ui/coherence/deep-bad-copy-reason.rs +++ b/tests/ui/coherence/deep-bad-copy-reason.rs @@ -31,7 +31,7 @@ impl<'tcx, T> Clone for List<'tcx, T> { } impl<'tcx, T> Copy for List<'tcx, T> {} -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type fn assert_is_copy() {} diff --git a/tests/ui/coherence/deep-bad-copy-reason.stderr b/tests/ui/coherence/deep-bad-copy-reason.stderr index 168ee57263d..7b6dd4b380f 100644 --- a/tests/ui/coherence/deep-bad-copy-reason.stderr +++ b/tests/ui/coherence/deep-bad-copy-reason.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/deep-bad-copy-reason.rs:33:24 | LL | pub struct List<'tcx, T>(Interned<'tcx, ListS>); diff --git a/tests/ui/error-codes/E0184.stderr b/tests/ui/error-codes/E0184.stderr index bb3017b6ec2..52f1f30a408 100644 --- a/tests/ui/error-codes/E0184.stderr +++ b/tests/ui/error-codes/E0184.stderr @@ -1,4 +1,4 @@ -error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor +error[E0184]: the trait `Copy` cannot be implemented for this type; the type has a destructor --> $DIR/E0184.rs:1:10 | LL | #[derive(Copy)] diff --git a/tests/ui/error-codes/E0206.rs b/tests/ui/error-codes/E0206.rs index 0f3d427ce11..74738d81015 100644 --- a/tests/ui/error-codes/E0206.rs +++ b/tests/ui/error-codes/E0206.rs @@ -2,7 +2,7 @@ struct Bar; impl Copy for &'static mut Bar { } -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type fn main() { } diff --git a/tests/ui/error-codes/E0206.stderr b/tests/ui/error-codes/E0206.stderr index 57ae2647d33..60d8d7bfe98 100644 --- a/tests/ui/error-codes/E0206.stderr +++ b/tests/ui/error-codes/E0206.stderr @@ -1,4 +1,4 @@ -error[E0206]: the trait `Copy` may not be implemented for this type +error[E0206]: the trait `Copy` cannot be implemented for this type --> $DIR/E0206.rs:4:15 | LL | impl Copy for &'static mut Bar { } diff --git a/tests/ui/exclusive-drop-and-copy.rs b/tests/ui/exclusive-drop-and-copy.rs index 7a251671ee9..210ecaed756 100644 --- a/tests/ui/exclusive-drop-and-copy.rs +++ b/tests/ui/exclusive-drop-and-copy.rs @@ -1,13 +1,13 @@ // issue #20126 -#[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented +#[derive(Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented struct Foo; impl Drop for Foo { fn drop(&mut self) {} } -#[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented +#[derive(Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented struct Bar(::std::marker::PhantomData); impl Drop for Bar { diff --git a/tests/ui/exclusive-drop-and-copy.stderr b/tests/ui/exclusive-drop-and-copy.stderr index 8649c8abbfa..546079422a7 100644 --- a/tests/ui/exclusive-drop-and-copy.stderr +++ b/tests/ui/exclusive-drop-and-copy.stderr @@ -1,4 +1,4 @@ -error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor +error[E0184]: the trait `Copy` cannot be implemented for this type; the type has a destructor --> $DIR/exclusive-drop-and-copy.rs:3:10 | LL | #[derive(Copy, Clone)] @@ -6,7 +6,7 @@ LL | #[derive(Copy, Clone)] | = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor +error[E0184]: the trait `Copy` cannot be implemented for this type; the type has a destructor --> $DIR/exclusive-drop-and-copy.rs:10:10 | LL | #[derive(Copy, Clone)] diff --git a/tests/ui/issues/issue-27340.rs b/tests/ui/issues/issue-27340.rs index 61c77cc1ff3..aff37d95a3f 100644 --- a/tests/ui/issues/issue-27340.rs +++ b/tests/ui/issues/issue-27340.rs @@ -1,6 +1,6 @@ struct Foo; #[derive(Copy, Clone)] -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type struct Bar(Foo); fn main() {} diff --git a/tests/ui/issues/issue-27340.stderr b/tests/ui/issues/issue-27340.stderr index 40889b86668..9caaffd9c9a 100644 --- a/tests/ui/issues/issue-27340.stderr +++ b/tests/ui/issues/issue-27340.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/issue-27340.rs:2:10 | LL | #[derive(Copy, Clone)] diff --git a/tests/ui/opt-in-copy.rs b/tests/ui/opt-in-copy.rs index 0b48418e464..d0257b5745d 100644 --- a/tests/ui/opt-in-copy.rs +++ b/tests/ui/opt-in-copy.rs @@ -5,7 +5,7 @@ struct IWantToCopyThis { } impl Copy for IWantToCopyThis {} -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type enum CantCopyThisEither { A, @@ -17,6 +17,6 @@ enum IWantToCopyThisToo { } impl Copy for IWantToCopyThisToo {} -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type fn main() {} diff --git a/tests/ui/opt-in-copy.stderr b/tests/ui/opt-in-copy.stderr index 4461567df0a..258ff16e6e4 100644 --- a/tests/ui/opt-in-copy.stderr +++ b/tests/ui/opt-in-copy.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/opt-in-copy.rs:7:15 | LL | but_i_cant: CantCopyThis, @@ -7,7 +7,7 @@ LL | but_i_cant: CantCopyThis, LL | impl Copy for IWantToCopyThis {} | ^^^^^^^^^^^^^^^ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/opt-in-copy.rs:19:15 | LL | ButICant(CantCopyThisEither), diff --git a/tests/ui/range/range_traits-2.stderr b/tests/ui/range/range_traits-2.stderr index 61facba535b..0829fc2ce9b 100644 --- a/tests/ui/range/range_traits-2.stderr +++ b/tests/ui/range/range_traits-2.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/range_traits-2.rs:3:10 | LL | #[derive(Copy, Clone)] diff --git a/tests/ui/range/range_traits-3.stderr b/tests/ui/range/range_traits-3.stderr index e54d17b329e..db19d1baec9 100644 --- a/tests/ui/range/range_traits-3.stderr +++ b/tests/ui/range/range_traits-3.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/range_traits-3.rs:3:10 | LL | #[derive(Copy, Clone)] diff --git a/tests/ui/range/range_traits-6.stderr b/tests/ui/range/range_traits-6.stderr index addc525f1fa..dfc74f87ca7 100644 --- a/tests/ui/range/range_traits-6.stderr +++ b/tests/ui/range/range_traits-6.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/range_traits-6.rs:3:10 | LL | #[derive(Copy, Clone)] diff --git a/tests/ui/span/E0204.rs b/tests/ui/span/E0204.rs index 174de8cdd63..8793a05c8a8 100644 --- a/tests/ui/span/E0204.rs +++ b/tests/ui/span/E0204.rs @@ -2,9 +2,9 @@ struct Foo { foo: Vec, } -impl Copy for Foo { } //~ ERROR may not be implemented for this type +impl Copy for Foo { } //~ ERROR cannot be implemented for this type -#[derive(Copy)] //~ ERROR may not be implemented for this type +#[derive(Copy)] //~ ERROR cannot be implemented for this type struct Foo2<'a> { ty: &'a mut bool, } @@ -14,9 +14,9 @@ enum EFoo { Baz, } -impl Copy for EFoo { } //~ ERROR may not be implemented for this type +impl Copy for EFoo { } //~ ERROR cannot be implemented for this type -#[derive(Copy)] //~ ERROR may not be implemented for this type +#[derive(Copy)] //~ ERROR cannot be implemented for this type enum EFoo2<'a> { Bar(&'a mut bool), Baz, diff --git a/tests/ui/span/E0204.stderr b/tests/ui/span/E0204.stderr index 0b2166eed7e..3a0afb541ba 100644 --- a/tests/ui/span/E0204.stderr +++ b/tests/ui/span/E0204.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/E0204.rs:5:15 | LL | foo: Vec, @@ -7,7 +7,7 @@ LL | foo: Vec, LL | impl Copy for Foo { } | ^^^ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/E0204.rs:7:10 | LL | #[derive(Copy)] @@ -18,7 +18,7 @@ LL | ty: &'a mut bool, | = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/E0204.rs:17:15 | LL | Bar { x: Vec }, @@ -27,7 +27,7 @@ LL | Bar { x: Vec }, LL | impl Copy for EFoo { } | ^^^^ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/E0204.rs:19:10 | LL | #[derive(Copy)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed index 304360d48a2..47b35b412c0 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.fixed @@ -7,7 +7,7 @@ pub struct Vector2{ pub y: T } -#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented for this type +#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented for this type pub struct AABB{ pub loc: Vector2, pub size: Vector2 diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs index 14e1fbb3311..771e9105c62 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.rs @@ -7,7 +7,7 @@ pub struct Vector2{ pub y: T } -#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented for this type +#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented for this type pub struct AABB{ pub loc: Vector2, pub size: Vector2 diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr index faf730a5ce3..83bc65ea1c8 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-3.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/missing-bound-in-derive-copy-impl-3.rs:10:17 | LL | #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs index 52163bddd4f..9c7b7ba099c 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs @@ -6,7 +6,7 @@ pub struct Vector2{ pub y: T } -#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented for this type +#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented for this type pub struct AABB{ pub loc: Vector2, pub size: Vector2 diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr index 11bc5409917..65dc3113731 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/missing-bound-in-derive-copy-impl.rs:9:17 | LL | #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed index 691e7553a09..f32c61a99bb 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.fixed @@ -14,6 +14,6 @@ impl Clone for OnlyCopyIfDisplay { impl Copy for OnlyCopyIfDisplay {} impl Copy for Wrapper> {} -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type fn main() {} diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs index e3185e7eff8..d7725f4a374 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.rs @@ -14,6 +14,6 @@ impl Clone for OnlyCopyIfDisplay { impl Copy for OnlyCopyIfDisplay {} impl Copy for Wrapper> {} -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type fn main() {} diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr index 9e6f0d9ebbd..856d8db381b 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl-2.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/missing-bound-in-manual-copy-impl-2.rs:16:18 | LL | struct Wrapper(T); diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed index 32a7215c5bd..1139b315313 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.fixed @@ -4,6 +4,6 @@ struct Wrapper(T); impl Copy for Wrapper {} -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type fn main() {} diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs index c688f4d41ee..19549248efc 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.rs @@ -4,6 +4,6 @@ struct Wrapper(T); impl Copy for Wrapper {} -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type fn main() {} diff --git a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr index fe2d133c8aa..ec3e4f23a64 100644 --- a/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr +++ b/tests/ui/suggestions/missing-bound-in-manual-copy-impl.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/missing-bound-in-manual-copy-impl.rs:6:18 | LL | struct Wrapper(T); diff --git a/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr b/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr index edd94d2010b..13042521184 100644 --- a/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr +++ b/tests/ui/traits/copy-is-not-modulo-regions.not_static.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/copy-is-not-modulo-regions.rs:13:21 | LL | struct Bar<'lt>(Foo<'lt>); diff --git a/tests/ui/traits/copy-is-not-modulo-regions.rs b/tests/ui/traits/copy-is-not-modulo-regions.rs index adb87023769..b899083747a 100644 --- a/tests/ui/traits/copy-is-not-modulo-regions.rs +++ b/tests/ui/traits/copy-is-not-modulo-regions.rs @@ -11,7 +11,7 @@ struct Bar<'lt>(Foo<'lt>); #[cfg(not_static)] impl<'any> Copy for Bar<'any> {} -//[not_static]~^ the trait `Copy` may not be implemented for this type +//[not_static]~^ the trait `Copy` cannot be implemented for this type #[cfg(yes_static)] impl<'any> Copy for Bar<'static> {} diff --git a/tests/ui/traits/issue-50480.rs b/tests/ui/traits/issue-50480.rs index 005939e0c46..683a85a32c1 100644 --- a/tests/ui/traits/issue-50480.rs +++ b/tests/ui/traits/issue-50480.rs @@ -1,5 +1,5 @@ #[derive(Clone, Copy)] -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type struct Foo(N, NotDefined, ::Item, Vec, String); //~^ ERROR cannot find type `NotDefined` in this scope //~| ERROR cannot find type `NotDefined` in this scope @@ -7,7 +7,7 @@ struct Foo(N, NotDefined, ::Item, Vec, String); //~| ERROR cannot find type `N` in this scope #[derive(Clone, Copy)] -//~^ ERROR the trait `Copy` may not be implemented for this type +//~^ ERROR the trait `Copy` cannot be implemented for this type struct Bar(T, N, NotDefined, ::Item, Vec, String); //~^ ERROR cannot find type `NotDefined` in this scope //~| ERROR cannot find type `N` in this scope diff --git a/tests/ui/traits/issue-50480.stderr b/tests/ui/traits/issue-50480.stderr index 5063fdca092..4f72db60a16 100644 --- a/tests/ui/traits/issue-50480.stderr +++ b/tests/ui/traits/issue-50480.stderr @@ -60,7 +60,7 @@ error[E0412]: cannot find type `NotDefined` in this scope LL | struct Bar(T, N, NotDefined, ::Item, Vec, String); | ^^^^^^^^^^ not found in this scope -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/issue-50480.rs:1:17 | LL | #[derive(Clone, Copy)] @@ -73,7 +73,7 @@ LL | struct Foo(N, NotDefined, ::Item, Vec, String); | = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/issue-50480.rs:9:17 | LL | #[derive(Clone, Copy)] diff --git a/tests/ui/union/union-copy.rs b/tests/ui/union/union-copy.rs index 5c3f8d90898..7ad0a11c6ac 100644 --- a/tests/ui/union/union-copy.rs +++ b/tests/ui/union/union-copy.rs @@ -9,6 +9,6 @@ union W { } impl Copy for U {} // OK -impl Copy for W {} //~ ERROR the trait `Copy` may not be implemented for this type +impl Copy for W {} //~ ERROR the trait `Copy` cannot be implemented for this type fn main() {} diff --git a/tests/ui/union/union-copy.stderr b/tests/ui/union/union-copy.stderr index 53ee4dd2e5b..ff6fa48db90 100644 --- a/tests/ui/union/union-copy.stderr +++ b/tests/ui/union/union-copy.stderr @@ -1,4 +1,4 @@ -error[E0204]: the trait `Copy` may not be implemented for this type +error[E0204]: the trait `Copy` cannot be implemented for this type --> $DIR/union-copy.rs:12:15 | LL | a: std::mem::ManuallyDrop