Skip to content

Commit a439c02

Browse files
may not => cannot
1 parent 1a521db commit a439c02

38 files changed

+54
-54
lines changed

compiler/rustc_hir_analysis/locales/en-US.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ hir_analysis_missing_type_params =
8989
.note = because of the default `Self` reference, type parameters must be specified on object types
9090
9191
hir_analysis_copy_impl_on_type_with_dtor =
92-
the trait `Copy` may not be implemented for this type; the type has a destructor
92+
the trait `Copy` cannot be implemented for this type; the type has a destructor
9393
.label = `Copy` not allowed on types with destructors
9494
9595
hir_analysis_multiple_relaxed_default_bounds =
9696
type parameter has more than one relaxed default bound, only one is supported
9797
9898
hir_analysis_copy_impl_on_non_adt =
99-
the trait `Copy` may not be implemented for this type
99+
the trait `Copy` cannot be implemented for this type
100100
.label = type is not a structure or enumeration
101101
102102
hir_analysis_const_impl_for_non_const_trait =

compiler/rustc_hir_analysis/src/coherence/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fn visit_implementation_of_copy(tcx: TyCtxt<'_>, impl_did: LocalDefId) {
8686
tcx.sess,
8787
span,
8888
E0204,
89-
"the trait `Copy` may not be implemented for this type"
89+
"the trait `Copy` cannot be implemented for this type"
9090
);
9191

9292
// We'll try to suggest constraining type parameters to fulfill the requirements of

compiler/rustc_hir_typeck/locales/en-US.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ hir_typeck_field_multiply_specified_in_initializer =
44
.previous_use_label = first use of `{$ident}`
55
66
hir_typeck_copy_impl_on_type_with_dtor =
7-
the trait `Copy` may not be implemented for this type; the type has a destructor
7+
the trait `Copy` cannot be implemented for this type; the type has a destructor
88
.label = `Copy` not allowed on types with destructors
99
1010
hir_typeck_multiple_relaxed_default_bounds =
1111
type parameter has more than one relaxed default bound, only one is supported
1212
1313
hir_typeck_copy_impl_on_non_adt =
14-
the trait `Copy` may not be implemented for this type
14+
the trait `Copy` cannot be implemented for this type
1515
.label = type is not a structure or enumeration
1616
1717
hir_typeck_trait_object_declared_with_no_traits =

library/core/src/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ pub trait StructuralEq {
324324
/// attempt to derive a `Copy` implementation, we'll get an error:
325325
///
326326
/// ```text
327-
/// the trait `Copy` may not be implemented for this type; field `points` does not implement `Copy`
327+
/// the trait `Copy` cannot be implemented for this type; field `points` does not implement `Copy`
328328
/// ```
329329
///
330330
/// Shared references (`&T`) are also `Copy`, so a type can be `Copy`, even when it holds

tests/ui/coherence/coherence-impls-copy.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ LL | impl Copy for [MyType] {}
5252
|
5353
= note: define and implement a trait or new type instead
5454

55-
error[E0206]: the trait `Copy` may not be implemented for this type
55+
error[E0206]: the trait `Copy` cannot be implemented for this type
5656
--> $DIR/coherence-impls-copy.rs:21:15
5757
|
5858
LL | impl Copy for &'static mut MyType {}
5959
| ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration
6060

61-
error[E0206]: the trait `Copy` may not be implemented for this type
61+
error[E0206]: the trait `Copy` cannot be implemented for this type
6262
--> $DIR/coherence-impls-copy.rs:25:15
6363
|
6464
LL | impl Copy for (MyType, MyType) {}
6565
| ^^^^^^^^^^^^^^^^ type is not a structure or enumeration
6666

67-
error[E0206]: the trait `Copy` may not be implemented for this type
67+
error[E0206]: the trait `Copy` cannot be implemented for this type
6868
--> $DIR/coherence-impls-copy.rs:30:15
6969
|
7070
LL | impl Copy for [MyType] {}

tests/ui/coherence/deep-bad-copy-reason.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'tcx, T> Clone for List<'tcx, T> {
3131
}
3232

3333
impl<'tcx, T> Copy for List<'tcx, T> {}
34-
//~^ ERROR the trait `Copy` may not be implemented for this type
34+
//~^ ERROR the trait `Copy` cannot be implemented for this type
3535

3636
fn assert_is_copy<T: Copy>() {}
3737

tests/ui/coherence/deep-bad-copy-reason.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0204]: the trait `Copy` may not be implemented for this type
1+
error[E0204]: the trait `Copy` cannot be implemented for this type
22
--> $DIR/deep-bad-copy-reason.rs:33:24
33
|
44
LL | pub struct List<'tcx, T>(Interned<'tcx, ListS<T>>);

tests/ui/error-codes/E0184.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor
1+
error[E0184]: the trait `Copy` cannot be implemented for this type; the type has a destructor
22
--> $DIR/E0184.rs:1:10
33
|
44
LL | #[derive(Copy)]

tests/ui/error-codes/E0206.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
struct Bar;
33

44
impl Copy for &'static mut Bar { }
5-
//~^ ERROR the trait `Copy` may not be implemented for this type
5+
//~^ ERROR the trait `Copy` cannot be implemented for this type
66

77
fn main() {
88
}

tests/ui/error-codes/E0206.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0206]: the trait `Copy` may not be implemented for this type
1+
error[E0206]: the trait `Copy` cannot be implemented for this type
22
--> $DIR/E0206.rs:4:15
33
|
44
LL | impl Copy for &'static mut Bar { }

0 commit comments

Comments
 (0)