diff --git a/src/librustc_typeck/coherence/orphan.rs b/src/librustc_typeck/coherence/orphan.rs index 54e4a86cc4ec5..2df137c3f5094 100644 --- a/src/librustc_typeck/coherence/orphan.rs +++ b/src/librustc_typeck/coherence/orphan.rs @@ -40,7 +40,7 @@ impl<'cx, 'tcx, 'v> ItemLikeVisitor<'v> for OrphanChecker<'cx, 'tcx> { "only traits defined in the current crate can be \ implemented for arbitrary types") .span_label(sp, "impl doesn't use types inside crate") - .note("the impl does not reference any types defined in this crate") + .note("the impl does not reference only types defined in this crate") .note("define and implement a trait or new type instead") .emit(); return; diff --git a/src/test/ui/coherence/coherence-cow.re_a.stderr b/src/test/ui/coherence/coherence-cow.re_a.stderr index ed627600b0f5d..b0ec55a9bc578 100644 --- a/src/test/ui/coherence/coherence-cow.re_a.stderr +++ b/src/test/ui/coherence/coherence-cow.re_a.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-cow.re_b.stderr b/src/test/ui/coherence/coherence-cow.re_b.stderr index 1a85887ae7bc4..ce2611270938d 100644 --- a/src/test/ui/coherence/coherence-cow.re_b.stderr +++ b/src/test/ui/coherence/coherence-cow.re_b.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair,T> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-cow.re_c.stderr b/src/test/ui/coherence/coherence-cow.re_c.stderr index 8043b6702b07e..1c2030d8dfea8 100644 --- a/src/test/ui/coherence/coherence-cow.re_c.stderr +++ b/src/test/ui/coherence/coherence-cow.re_c.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair,U> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr b/src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr index 756ab2b102b56..2d1247e831ec4 100644 --- a/src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr +++ b/src/test/ui/coherence/coherence-fundamental-trait-objects.old.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Misc for dyn Fundamental {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-fundamental-trait-objects.re.stderr b/src/test/ui/coherence/coherence-fundamental-trait-objects.re.stderr index 756ab2b102b56..2d1247e831ec4 100644 --- a/src/test/ui/coherence/coherence-fundamental-trait-objects.re.stderr +++ b/src/test/ui/coherence/coherence-fundamental-trait-objects.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Misc for dyn Fundamental {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-impls-copy.old.stderr b/src/test/ui/coherence/coherence-impls-copy.old.stderr index defbbbadd5598..e870c267ce141 100644 --- a/src/test/ui/coherence/coherence-impls-copy.old.stderr +++ b/src/test/ui/coherence/coherence-impls-copy.old.stderr @@ -51,7 +51,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for i32 {} | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -60,7 +60,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -69,7 +69,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -78,7 +78,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 10 previous errors diff --git a/src/test/ui/coherence/coherence-impls-copy.re.stderr b/src/test/ui/coherence/coherence-impls-copy.re.stderr index defbbbadd5598..e870c267ce141 100644 --- a/src/test/ui/coherence/coherence-impls-copy.re.stderr +++ b/src/test/ui/coherence/coherence-impls-copy.re.stderr @@ -51,7 +51,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for i32 {} | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -60,7 +60,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -69,7 +69,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -78,7 +78,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 10 previous errors diff --git a/src/test/ui/coherence/coherence-impls-send.old.stderr b/src/test/ui/coherence/coherence-impls-send.old.stderr index ca45c28ec2d74..3ede8363d119e 100644 --- a/src/test/ui/coherence/coherence-impls-send.old.stderr +++ b/src/test/ui/coherence/coherence-impls-send.old.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | unsafe impl Send for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync` @@ -19,7 +19,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | unsafe impl Send for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -28,7 +28,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | unsafe impl Send for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 4 previous errors diff --git a/src/test/ui/coherence/coherence-impls-send.re.stderr b/src/test/ui/coherence/coherence-impls-send.re.stderr index ca45c28ec2d74..3ede8363d119e 100644 --- a/src/test/ui/coherence/coherence-impls-send.re.stderr +++ b/src/test/ui/coherence/coherence-impls-send.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | unsafe impl Send for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync` @@ -19,7 +19,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | unsafe impl Send for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -28,7 +28,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | unsafe impl Send for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 4 previous errors diff --git a/src/test/ui/coherence/coherence-impls-sized.old.stderr b/src/test/ui/coherence/coherence-impls-sized.old.stderr index c9c7dd0ed6688..86a0996554d41 100644 --- a/src/test/ui/coherence/coherence-impls-sized.old.stderr +++ b/src/test/ui/coherence/coherence-impls-sized.old.stderr @@ -40,7 +40,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Sized for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -49,7 +49,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Sized for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -58,7 +58,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Sized for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 9 previous errors diff --git a/src/test/ui/coherence/coherence-impls-sized.re.stderr b/src/test/ui/coherence/coherence-impls-sized.re.stderr index c9c7dd0ed6688..86a0996554d41 100644 --- a/src/test/ui/coherence/coherence-impls-sized.re.stderr +++ b/src/test/ui/coherence/coherence-impls-sized.re.stderr @@ -40,7 +40,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Sized for (MyType, MyType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -49,7 +49,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Sized for [MyType] {} | ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -58,7 +58,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Sized for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 9 previous errors diff --git a/src/test/ui/coherence/coherence-orphan.old.stderr b/src/test/ui/coherence/coherence-orphan.old.stderr index da5de461bf41b..e6dc17d95a241 100644 --- a/src/test/ui/coherence/coherence-orphan.old.stderr +++ b/src/test/ui/coherence/coherence-orphan.old.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl TheTrait for isize { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -13,7 +13,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl !Send for Vec { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 2 previous errors diff --git a/src/test/ui/coherence/coherence-orphan.re.stderr b/src/test/ui/coherence/coherence-orphan.re.stderr index da5de461bf41b..e6dc17d95a241 100644 --- a/src/test/ui/coherence/coherence-orphan.re.stderr +++ b/src/test/ui/coherence/coherence-orphan.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl TheTrait for isize { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -13,7 +13,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl !Send for Vec { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 2 previous errors diff --git a/src/test/ui/coherence/coherence-overlapping-pairs.re.stderr b/src/test/ui/coherence/coherence-overlapping-pairs.re.stderr index 0f2ec6f4ce069..a6fa609deb214 100644 --- a/src/test/ui/coherence/coherence-overlapping-pairs.re.stderr +++ b/src/test/ui/coherence/coherence-overlapping-pairs.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for lib::Pair { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.re.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.re.stderr index 0c654ca41835d..e45cd78363ca7 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.re.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote1>> for i32 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered.re.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered.re.stderr index 9bddc15390212..54d5f3058a85c 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered.re.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-vec-local-2.re.stderr b/src/test/ui/coherence/coherence-vec-local-2.re.stderr index 37859f7cfa285..6992aa7a0bdc6 100644 --- a/src/test/ui/coherence/coherence-vec-local-2.re.stderr +++ b/src/test/ui/coherence/coherence-vec-local-2.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Vec> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-vec-local.old.stderr b/src/test/ui/coherence/coherence-vec-local.old.stderr index 304aaaf36875c..b35e7a8ba8bed 100644 --- a/src/test/ui/coherence/coherence-vec-local.old.stderr +++ b/src/test/ui/coherence/coherence-vec-local.old.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Vec { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-vec-local.re.stderr b/src/test/ui/coherence/coherence-vec-local.re.stderr index 304aaaf36875c..b35e7a8ba8bed 100644 --- a/src/test/ui/coherence/coherence-vec-local.re.stderr +++ b/src/test/ui/coherence/coherence-vec-local.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Vec { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_local_err_struct.old.stderr b/src/test/ui/coherence/coherence_local_err_struct.old.stderr index 61c94c1c7cad7..e1f651493f67c 100644 --- a/src/test/ui/coherence/coherence_local_err_struct.old.stderr +++ b/src/test/ui/coherence/coherence_local_err_struct.old.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl lib::MyCopy for lib::MyStruct { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_local_err_struct.re.stderr b/src/test/ui/coherence/coherence_local_err_struct.re.stderr index 61c94c1c7cad7..e1f651493f67c 100644 --- a/src/test/ui/coherence/coherence_local_err_struct.re.stderr +++ b/src/test/ui/coherence/coherence_local_err_struct.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl lib::MyCopy for lib::MyStruct { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_local_err_tuple.old.stderr b/src/test/ui/coherence/coherence_local_err_tuple.old.stderr index 934e2fcb890e3..171daa54861fe 100644 --- a/src/test/ui/coherence/coherence_local_err_tuple.old.stderr +++ b/src/test/ui/coherence/coherence_local_err_tuple.old.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl lib::MyCopy for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_local_err_tuple.re.stderr b/src/test/ui/coherence/coherence_local_err_tuple.re.stderr index 934e2fcb890e3..171daa54861fe 100644 --- a/src/test/ui/coherence/coherence_local_err_tuple.re.stderr +++ b/src/test/ui/coherence/coherence_local_err_tuple.re.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl lib::MyCopy for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to previous error diff --git a/src/test/ui/dropck/drop-on-non-struct.stderr b/src/test/ui/dropck/drop-on-non-struct.stderr index c458635040a21..6b670d5d434e4 100644 --- a/src/test/ui/dropck/drop-on-non-struct.stderr +++ b/src/test/ui/dropck/drop-on-non-struct.stderr @@ -10,7 +10,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl<'a> Drop for &'a mut isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index 8e32db49cedee..b007ca05ab2cf 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -10,7 +10,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Drop for u32 {} //~ ERROR E0117 | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0206.stderr b/src/test/ui/error-codes/E0206.stderr index 499c6ae3f8852..a0c4b0149a099 100644 --- a/src/test/ui/error-codes/E0206.stderr +++ b/src/test/ui/error-codes/E0206.stderr @@ -16,7 +16,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Copy for Foo { } | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 3 previous errors diff --git a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr index b8b743d3f4072..2bfb4110603f5 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl DefaultedTrait for (A,) { } //~ ERROR E0117 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -13,7 +13,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl !DefaultedTrait for (B,) { } //~ ERROR E0117 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error[E0321]: cross-crate traits with a default impl, like `lib::DefaultedTrait`, can only be implemented for a struct/enum type defined in the current crate @@ -28,7 +28,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl DefaultedTrait for lib::Something { } //~ ERROR E0117 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | - = note: the impl does not reference any types defined in this crate + = note: the impl does not reference only types defined in this crate = note: define and implement a trait or new type instead error: aborting due to 4 previous errors diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index c35addc4f21a8..2e5feca54151c 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -489,7 +489,7 @@ pub fn run_tests(config: &Config) { // Let tests know which target they're running as env::set_var("TARGET", &config.target); - let res = test::run_tests_console(&opts, tests.into_iter().collect()); + let res = test::run_tests_console(&opts, tests); match res { Ok(true) => {} Ok(false) => panic!("Some tests failed"), @@ -548,22 +548,18 @@ fn collect_tests_from_dir( relative_dir_path: &Path, tests: &mut Vec, ) -> io::Result<()> { - // Ignore directories that contain a file - // `compiletest-ignore-dir`. - for file in fs::read_dir(dir)? { - let file = file?; - let name = file.file_name(); - if name == *"compiletest-ignore-dir" { - return Ok(()); - } - if name == *"Makefile" && config.mode == Mode::RunMake { - let paths = TestPaths { - file: dir.to_path_buf(), - relative_dir: relative_dir_path.parent().unwrap().to_path_buf(), - }; - tests.extend(make_test(config, &paths)); - return Ok(()); - } + // Ignore directories that contain a file named `compiletest-ignore-dir`. + if dir.join("compiletest-ignore-dir").exists() { + return Ok(()); + } + + if config.mode == Mode::RunMake && dir.join("Makefile").exists() { + let paths = TestPaths { + file: dir.to_path_buf(), + relative_dir: relative_dir_path.parent().unwrap().to_path_buf(), + }; + tests.extend(make_test(config, &paths)); + return Ok(()); } // If we find a test foo/bar.rs, we have to build the @@ -577,8 +573,7 @@ fn collect_tests_from_dir( // Add each `.rs` file as a test, and recurse further on any // subdirectories we find, except for `aux` directories. - let dirs = fs::read_dir(dir)?; - for file in dirs { + for file in fs::read_dir(dir)? { let file = file?; let file_path = file.path(); let file_name = file.file_name(); @@ -679,7 +674,7 @@ fn collect_timestamps(path: &PathBuf) -> impl Iterator { WalkDir::new(path) .into_iter() .map(|entry| entry.unwrap()) - .filter(|entry| entry.metadata().unwrap().is_file()) + .filter(|entry| entry.file_type().is_file()) .map(|entry| mtime(entry.path())) } @@ -707,14 +702,12 @@ fn up_to_date( .expect("Could not find Rust source root"); let stamp = mtime(&stamp_name); let mut inputs = vec![mtime(&testpaths.file), mtime(&config.rustc_path)]; - for aux in props.aux.iter() { - inputs.push(mtime(&testpaths - .file - .parent() - .unwrap() - .join("auxiliary") - .join(aux))); - } + inputs.extend( + props + .aux + .iter() + .map(|aux| mtime(&testpaths.file.parent().unwrap().join("auxiliary").join(aux))), + ); // Relevant pretty printer files let pretty_printer_files = [ "src/etc/debugger_pretty_printers_common.py", @@ -723,9 +716,9 @@ fn up_to_date( "src/etc/lldb_batchmode.py", "src/etc/lldb_rust_formatters.py", ]; - for pretty_printer_file in &pretty_printer_files { - inputs.push(mtime(&rust_src_dir.join(pretty_printer_file))); - } + inputs.extend(pretty_printer_files.iter().map(|pretty_printer_file| { + mtime(&rust_src_dir.join(pretty_printer_file)) + })); inputs.extend(collect_timestamps(&config.run_lib_path)); if let Some(ref rustdoc_path) = config.rustdoc_path { inputs.push(mtime(&rustdoc_path)); @@ -733,10 +726,10 @@ fn up_to_date( } // UI test files. - for extension in UI_EXTENSIONS { + inputs.extend(UI_EXTENSIONS.iter().map(|extension| { let path = &expected_output_path(testpaths, revision, &config.compare_mode, extension); - inputs.push(mtime(path)); - } + mtime(path) + })); // Compiletest itself. inputs.extend(collect_timestamps(&rust_src_dir.join("src/tools/compiletest/")));