Skip to content

Commit 786e3ea

Browse files
committed
Fix grammar in note for orphan-rule error [E0210]
1 parent 5a51185 commit 786e3ea

21 files changed

+29
-29
lines changed

compiler/rustc_typeck/src/coherence/orphan.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl ItemLikeVisitor<'v> for OrphanChecker<'tcx> {
110110
)
111111
.note(
112112
"implementing a foreign trait is only possible if at \
113-
least one of the types for which is it implemented is local, \
113+
least one of the types for which it is implemented is local, \
114114
and no uncovered type parameters appear before that first \
115115
local type",
116116
)
@@ -135,7 +135,7 @@ impl ItemLikeVisitor<'v> for OrphanChecker<'tcx> {
135135
local type",
136136
param_ty,
137137
)).note("implementing a foreign trait is only possible if at \
138-
least one of the types for which is it implemented is local"
138+
least one of the types for which it is implemented is local"
139139
).note("only traits defined in the current crate can be \
140140
implemented for a type parameter"
141141
).emit();

src/test/ui/coherence/coherence-all-remote.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<T> for isize { }
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error: aborting due to previous error

src/test/ui/coherence/coherence-bigint-param.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears
44
LL | impl<T> Remote1<BigInt> for T { }
55
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`BigInt`)
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
88
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
99

1010
error: aborting due to previous error

src/test/ui/coherence/coherence-cross-crate-conflict.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ error[E0210]: type parameter `A` must be used as the type parameter for some loc
1313
LL | impl<A> Foo for A {
1414
| ^ type parameter `A` must be used as the type parameter for some local type
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1717
= note: only traits defined in the current crate can be implemented for a type parameter
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/coherence-lone-type-parameter.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote for T { }
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error: aborting due to previous error

src/test/ui/coherence/impl[t]-foreign-for-fundamental[t].stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote for Box<T> {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error: aborting due to previous error

src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<u32> for Box<T> {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
1313
LL | impl<'a, T> Remote1<u32> for &'a T {
1414
| ^ type parameter `T` must be used as the type parameter for some local type
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1717
= note: only traits defined in the current crate can be implemented for a type parameter
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<u32> for T {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error: aborting due to previous error

src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-foreign.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<Box<T>> for u32 {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
1313
LL | impl<'a, T> Remote1<&'a T> for u32 {
1414
| ^ type parameter `T` must be used as the type parameter for some local type
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1717
= note: only traits defined in the current crate can be implemented for a type parameter
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-fundamental[t].stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<'a, T> Remote1<Box<T>> for &'a T {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
1313
LL | impl<'a, T> Remote1<&'a T> for Box<T> {
1414
| ^ type parameter `T` must be used as the type parameter for some local type
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1717
= note: only traits defined in the current crate can be implemented for a type parameter
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/impl[t]-foreign[fundamental[t]]-for-t.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<Box<T>> for T {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
@@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
1313
LL | impl<'a, T> Remote1<&'a T> for T {
1414
| ^ type parameter `T` must be used as the type parameter for some local type
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1717
= note: only traits defined in the current crate can be implemented for a type parameter
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/impl[t]-foreign[fundamental[t]_local]-for-foreign.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears
44
LL | impl<T> Remote2<Box<T>, Local> for u32 {
55
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
88
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
99

1010
error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
@@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears
1313
LL | impl<'a, T> Remote2<&'a T, Local> for u32 {
1414
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
1717
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/impl[t]-foreign[local]-for-fundamental[t].stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears
44
LL | impl<T> Remote1<Local> for Box<T> {
55
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
88
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
99

1010
error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
@@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears
1313
LL | impl<T> Remote1<Local> for &T {
1414
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
1717
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/impl[t]-foreign[local]-for-t.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears
44
LL | impl<T> Remote1<Local> for T {
55
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`)
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type
88
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last
99

1010
error: aborting due to previous error

src/test/ui/coherence/impl[t]-foreign[t]-for-foreign.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<T> for u32 {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error: aborting due to previous error

src/test/ui/coherence/impl[t]-foreign[t]-for-fundamental.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<T> for Box<T> {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error[E0210]: type parameter `B` must be used as the type parameter for some local type (e.g., `MyStruct<B>`)
@@ -13,7 +13,7 @@ error[E0210]: type parameter `B` must be used as the type parameter for some loc
1313
LL | impl<'a, A, B> Remote1<A> for &'a B {
1414
| ^ type parameter `B` must be used as the type parameter for some local type
1515
|
16-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
16+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1717
= note: only traits defined in the current crate can be implemented for a type parameter
1818

1919
error: aborting due to 2 previous errors

src/test/ui/coherence/impl[t]-foreign[t]-for-t.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> Remote1<T> for T {
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error: aborting due to previous error

src/test/ui/error-codes/e0119/issue-28981.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ error[E0210]: type parameter `Foo` must be used as the type parameter for some l
1414
LL | impl<Foo> Deref for Foo { }
1515
| ^^^ type parameter `Foo` must be used as the type parameter for some local type
1616
|
17-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
17+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1818
= note: only traits defined in the current crate can be implemented for a type parameter
1919

2020
error: aborting due to 2 previous errors

src/test/ui/issues/issue-41974.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
2121
LL | impl<T> Drop for T where T: A {
2222
| ^ type parameter `T` must be used as the type parameter for some local type
2323
|
24-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
24+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
2525
= note: only traits defined in the current crate can be implemented for a type parameter
2626

2727
error: aborting due to 3 previous errors

src/test/ui/orphan-check-diagnostics.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc
44
LL | impl<T> RemoteTrait for T where T: LocalTrait {}
55
| ^ type parameter `T` must be used as the type parameter for some local type
66
|
7-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
7+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
88
= note: only traits defined in the current crate can be implemented for a type parameter
99

1010
error: aborting due to previous error

src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ error[E0210]: type parameter `F` must be used as the type parameter for some loc
1414
LL | impl<F> FnOnce<()> for &F {
1515
| ^ type parameter `F` must be used as the type parameter for some local type
1616
|
17-
= note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local
17+
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
1818
= note: only traits defined in the current crate can be implemented for a type parameter
1919

2020
error: aborting due to 2 previous errors

0 commit comments

Comments
 (0)