From f233a4c18bec906dab0b8531f326a15fadece547 Mon Sep 17 00:00:00 2001 From: James Munns Date: Thu, 19 Sep 2019 00:16:16 +0200 Subject: [PATCH 1/2] Fix a minor grammar nit, update UI tests --- src/librustc/traits/select.rs | 2 +- src/test/ui/codemap_tests/overlapping_inherent_impls.stderr | 2 +- .../coherence/coherence-overlap-upstream-inherent.old.stderr | 2 +- .../coherence/coherence-overlap-upstream-inherent.re.stderr | 2 +- src/test/ui/coherence/coherence-overlap-upstream.old.stderr | 2 +- src/test/ui/coherence/coherence-overlap-upstream.re.stderr | 2 +- .../coherence/coherence-projection-conflict-orphan.old.stderr | 4 ++-- .../coherence/coherence-projection-conflict-orphan.re.stderr | 4 ++-- ...oherence_copy_like_err_fundamental_struct_tuple.old.stderr | 2 +- ...coherence_copy_like_err_fundamental_struct_tuple.re.stderr | 2 +- .../ui/coherence/coherence_copy_like_err_struct.old.stderr | 2 +- .../ui/coherence/coherence_copy_like_err_struct.re.stderr | 2 +- .../ui/coherence/coherence_copy_like_err_tuple.old.stderr | 2 +- src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr | 2 +- src/test/ui/issues/issue-48728.stderr | 2 +- src/test/ui/specialization/issue-52050.stderr | 4 ++-- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index 217c887d525..a54bc05f169 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -134,7 +134,7 @@ impl IntercrateAmbiguityCause { String::new() }; format!( - "upstream crates may add new impl of trait `{}`{} \ + "upstream crates may add a new impl of trait `{}`{} \ in future versions", trait_desc, self_desc ) diff --git a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr index 70c1093e9ed..8fe24bae7c6 100644 --- a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr +++ b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr @@ -25,7 +25,7 @@ LL | fn baz(&self) {} LL | fn baz(&self) {} | ---------------- other definition for `baz` | - = note: upstream crates may add new impl of trait `std::marker::Copy` for type `std::vec::Vec<_>` in future versions + = note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::vec::Vec<_>` in future versions error: aborting due to 3 previous errors diff --git a/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr b/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr index 928b65e0039..3a3e1a4afc3 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream-inherent.old.stderr @@ -7,7 +7,7 @@ LL | impl A where T: Remote { fn dummy(&self) { } } LL | impl A { fn dummy(&self) { } } | ------------------- other definition for `dummy` | - = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions + = 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 diff --git a/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr b/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr index 928b65e0039..3a3e1a4afc3 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream-inherent.re.stderr @@ -7,7 +7,7 @@ LL | impl A where T: Remote { fn dummy(&self) { } } LL | impl A { fn dummy(&self) { } } | ------------------- other definition for `dummy` | - = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions + = 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 diff --git a/src/test/ui/coherence/coherence-overlap-upstream.old.stderr b/src/test/ui/coherence/coherence-overlap-upstream.old.stderr index 6c3484c2d8c..bd6f59f346b 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream.old.stderr @@ -6,7 +6,7 @@ LL | impl Foo for T where T: Remote {} LL | impl Foo for i16 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` | - = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions + = 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 diff --git a/src/test/ui/coherence/coherence-overlap-upstream.re.stderr b/src/test/ui/coherence/coherence-overlap-upstream.re.stderr index 6c3484c2d8c..bd6f59f346b 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream.re.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream.re.stderr @@ -6,7 +6,7 @@ LL | impl Foo for T where T: Remote {} LL | impl Foo for i16 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` | - = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions + = 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 diff --git a/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr b/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr index cde9360ddf2..26dadec5bba 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr @@ -3,11 +3,11 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32`: | LL | impl Foo for i32 { } | --------------------- first implementation here -LL | +LL | LL | impl Foo for A { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | - = note: upstream crates may add new impl of trait `std::iter::Iterator` for type `i32` in future versions + = 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 diff --git a/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr b/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr index cde9360ddf2..26dadec5bba 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr @@ -3,11 +3,11 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32`: | LL | impl Foo for i32 { } | --------------------- first implementation here -LL | +LL | LL | impl Foo for A { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | - = note: upstream crates may add new impl of trait `std::iter::Iterator` for type `i32` in future versions + = 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 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.old.stderr index 12c7a1f977c..4d9f55c1215 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.old.stderr @@ -7,7 +7,7 @@ LL | impl MyTrait for T { } LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>` | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions + = 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 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 index 12c7a1f977c..4d9f55c1215 100644 --- 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 @@ -7,7 +7,7 @@ LL | impl MyTrait for T { } LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>` | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions + = 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 diff --git a/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr index 1b6c62e9bf3..f0bcf659bb6 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr @@ -7,7 +7,7 @@ LL | impl MyTrait for T { } LL | impl MyTrait for lib::MyStruct { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct` | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct` in future versions + = 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 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 index 1b6c62e9bf3..f0bcf659bb6 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr @@ -7,7 +7,7 @@ LL | impl MyTrait for T { } LL | impl MyTrait for lib::MyStruct { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct` | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct` in future versions + = 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 diff --git a/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr index 11bd788c761..a40153af2cf 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr @@ -7,7 +7,7 @@ LL | impl MyTrait for T { } LL | impl MyTrait for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)` | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions + = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions error: aborting due to previous error 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 index 11bd788c761..a40153af2cf 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr @@ -7,7 +7,7 @@ LL | impl MyTrait for T { } LL | impl MyTrait for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)` | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions + = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions error: aborting due to previous error diff --git a/src/test/ui/issues/issue-48728.stderr b/src/test/ui/issues/issue-48728.stderr index 99a9bf9903e..84c10d8fbc4 100644 --- a/src/test/ui/issues/issue-48728.stderr +++ b/src/test/ui/issues/issue-48728.stderr @@ -7,7 +7,7 @@ LL | #[derive(Clone)] LL | impl Clone for Node<[T]> { | ------------------------------------------- first implementation here | - = note: upstream crates may add new impl of trait `std::clone::Clone` for type `[_]` in future versions + = note: upstream crates may add a new impl of trait `std::clone::Clone` for type `[_]` in future versions error: aborting due to previous error diff --git a/src/test/ui/specialization/issue-52050.stderr b/src/test/ui/specialization/issue-52050.stderr index dcb34f3ad48..2a0f127bdaf 100644 --- a/src/test/ui/specialization/issue-52050.stderr +++ b/src/test/ui/specialization/issue-52050.stderr @@ -7,11 +7,11 @@ LL | | I: Iterator, LL | | { LL | | } | |_- first implementation here -LL | +LL | LL | impl IntoPyDictPointer for () | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` | - = note: upstream crates may add new impl of trait `std::iter::Iterator` for type `()` in future versions + = note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions error: aborting due to previous error From 333230fd140b3b39aa655bcfcda3ee6810b0ac3c Mon Sep 17 00:00:00 2001 From: James Munns Date: Thu, 19 Sep 2019 00:50:03 +0200 Subject: [PATCH 2/2] Restore whitespace --- .../coherence/coherence-projection-conflict-orphan.old.stderr | 2 +- .../ui/coherence/coherence-projection-conflict-orphan.re.stderr | 2 +- src/test/ui/specialization/issue-52050.stderr | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr b/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr index 26dadec5bba..728eae5e547 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict-orphan.old.stderr @@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32`: | LL | impl Foo for i32 { } | --------------------- first implementation here -LL | +LL | LL | impl Foo for A { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | diff --git a/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr b/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr index 26dadec5bba..728eae5e547 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict-orphan.re.stderr @@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `i32`: | LL | impl Foo for i32 { } | --------------------- first implementation here -LL | +LL | LL | impl Foo for A { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32` | diff --git a/src/test/ui/specialization/issue-52050.stderr b/src/test/ui/specialization/issue-52050.stderr index 2a0f127bdaf..36f96b01198 100644 --- a/src/test/ui/specialization/issue-52050.stderr +++ b/src/test/ui/specialization/issue-52050.stderr @@ -7,7 +7,7 @@ LL | | I: Iterator, LL | | { LL | | } | |_- first implementation here -LL | +LL | LL | impl IntoPyDictPointer for () | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` |