diff --git a/compiler/rustc_typeck/src/coherence/orphan.rs b/compiler/rustc_typeck/src/coherence/orphan.rs index 917fc5631c4f5..b2009962aba2e 100644 --- a/compiler/rustc_typeck/src/coherence/orphan.rs +++ b/compiler/rustc_typeck/src/coherence/orphan.rs @@ -110,7 +110,7 @@ impl ItemLikeVisitor<'v> for OrphanChecker<'tcx> { ) .note( "implementing a foreign trait is only possible if at \ - least one of the types for which is it implemented is local, \ + least one of the types for which it is implemented is local, \ and no uncovered type parameters appear before that first \ local type", ) @@ -135,7 +135,7 @@ impl ItemLikeVisitor<'v> for OrphanChecker<'tcx> { local type", param_ty, )).note("implementing a foreign trait is only possible if at \ - least one of the types for which is it implemented is local" + least one of the types for which it is implemented is local" ).note("only traits defined in the current crate can be \ implemented for a type parameter" ).emit(); diff --git a/src/test/ui/coherence/coherence-all-remote.stderr b/src/test/ui/coherence/coherence-all-remote.stderr index 6ecfb2c5eb0e3..7eca417533954 100644 --- a/src/test/ui/coherence/coherence-all-remote.stderr +++ b/src/test/ui/coherence/coherence-all-remote.stderr @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1 for isize { } | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-bigint-param.stderr b/src/test/ui/coherence/coherence-bigint-param.stderr index d431c5f4b5251..e8d74c917e465 100644 --- a/src/test/ui/coherence/coherence-bigint-param.stderr +++ b/src/test/ui/coherence/coherence-bigint-param.stderr @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears LL | impl Remote1 for T { } | ^ type parameter `T` must be covered by another type when it appears before the first local type (`BigInt`) | - = 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 + = 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 = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr index 5381053979f26..827d26ab43443 100644 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr +++ b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr @@ -13,7 +13,7 @@ error[E0210]: type parameter `A` must be used as the type parameter for some loc LL | impl Foo for A { | ^ type parameter `A` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/coherence/coherence-lone-type-parameter.stderr b/src/test/ui/coherence/coherence-lone-type-parameter.stderr index 2c3b4fc3ad2a8..ef5b088365381 100644 --- a/src/test/ui/coherence/coherence-lone-type-parameter.stderr +++ b/src/test/ui/coherence/coherence-lone-type-parameter.stderr @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote for T { } | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to previous error 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 8a951d407ca46..249a5c44c79cd 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote for Box { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to previous error 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 c5759244eff49..95a20cc5b0f5c 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1 for Box { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = 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`) @@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl<'a, T> Remote1 for &'a T { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors 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 e8663fd7d820d..aed184767a0bd 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1 for T { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to previous error 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 639bee2b8ec74..73b1e2c6ed248 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = 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`) @@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl<'a, T> Remote1<&'a T> for u32 { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors 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 0b6c81b53cd5f..5f89a7aa469c1 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl<'a, T> Remote1> for &'a T { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = 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`) @@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl<'a, T> Remote1<&'a T> for Box { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors 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 fe40490822e0f..45559d8b62d37 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1> for T { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = 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`) @@ -13,7 +13,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl<'a, T> Remote1<&'a T> for T { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors 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 1eaef59b3f880..f94f04c8df5c1 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears LL | impl Remote2, Local> for u32 { | ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`) | - = 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 + = 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 = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last 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 LL | impl<'a, T> Remote2<&'a T, Local> for u32 { | ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`) | - = 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 + = 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 = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last error: aborting due to 2 previous errors 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 4d39186d494c9..e68f2fe585637 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears LL | impl Remote1 for Box { | ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`) | - = 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 + = 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 = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last 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 LL | impl Remote1 for &T { | ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`) | - = 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 + = 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 = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last error: aborting due to 2 previous errors 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 d74be4cec728d..d97e85dcb3c3e 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be covered by another type when it appears LL | impl Remote1 for T { | ^ type parameter `T` must be covered by another type when it appears before the first local type (`Local`) | - = 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 + = 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 = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last error: aborting due to previous error 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 b26feb4914c63..44e3b7eedb40c 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1 for u32 { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to previous error 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 5e8cc552c9834..80fb5dbec8662 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1 for Box { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = 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`) @@ -13,7 +13,7 @@ error[E0210]: type parameter `B` must be used as the type parameter for some loc LL | impl<'a, A, B> Remote1 for &'a B { | ^ type parameter `B` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors 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 d3226d33beec7..ff72969dc52ae 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 @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Remote1 for T { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/e0119/issue-28981.stderr b/src/test/ui/error-codes/e0119/issue-28981.stderr index c22cc65c87fce..e12dd7623310d 100644 --- a/src/test/ui/error-codes/e0119/issue-28981.stderr +++ b/src/test/ui/error-codes/e0119/issue-28981.stderr @@ -14,7 +14,7 @@ error[E0210]: type parameter `Foo` must be used as the type parameter for some l LL | impl Deref for Foo { } | ^^^ type parameter `Foo` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-41974.stderr b/src/test/ui/issues/issue-41974.stderr index f1342181b37d9..a092c94b9d563 100644 --- a/src/test/ui/issues/issue-41974.stderr +++ b/src/test/ui/issues/issue-41974.stderr @@ -21,7 +21,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl Drop for T where T: A { | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 3 previous errors diff --git a/src/test/ui/orphan-check-diagnostics.stderr b/src/test/ui/orphan-check-diagnostics.stderr index c84d401898c91..7a7cea56307de 100644 --- a/src/test/ui/orphan-check-diagnostics.stderr +++ b/src/test/ui/orphan-check-diagnostics.stderr @@ -4,7 +4,7 @@ error[E0210]: type parameter `T` must be used as the type parameter for some loc LL | impl RemoteTrait for T where T: LocalTrait {} | ^ type parameter `T` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr index cb893c40c3252..eafbd2ad0725b 100644 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr +++ b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr @@ -14,7 +14,7 @@ error[E0210]: type parameter `F` must be used as the type parameter for some loc LL | impl FnOnce<()> for &F { | ^ type parameter `F` must be used as the type parameter for some local type | - = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter error: aborting due to 2 previous errors