Adjust orphan note in tests

This commit is contained in:
Jonathan Birk 2024-07-30 15:39:04 +00:00
parent 9ce811cd00
commit 86a9959466
35 changed files with 64 additions and 64 deletions

View File

@ -5,7 +5,7 @@ LL | impl<T> Remote for Pair<T,Cover<T>> { }
| ^^^^^^^^^^^^^^^^^^^----------------
| | |
| | `Pair` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl<T> Remote for Pair<Cover<T>,T> { }
| ^^^^^^^^^^^^^^^^^^^----------------
| | |
| | `Pair` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl<T,U> Remote for Pair<Cover<T>,U> { }
| ^^^^^^^^^^^^^^^^^^^^^----------------
| | |
| | `Pair` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl Misc for dyn Fundamental<Local> {}
| ^^^^^^^^^^^^^^----------------------
| | |
| | `dyn Fundamental<Local>` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -41,7 +41,7 @@ LL | impl !Send for dyn Marker2 {}
| ^^^^^^^^^^^^^^^-----------
| | |
| | `dyn Marker2` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -41,7 +41,7 @@ LL | unsafe impl Send for dyn Marker2 {}
| ^^^^^^^^^^^^^^^^^^^^^-----------
| | |
| | `dyn Marker2` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -15,7 +15,7 @@ LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^------------------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -26,7 +26,7 @@ LL | impl Copy for i32 {}
| ^^^^^^^^^^^^^^---
| | |
| | `i32` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -43,7 +43,7 @@ LL | impl Copy for (MyType, MyType) {}
| ^^^^^^^^^^^^^^----------------
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -60,7 +60,7 @@ LL | impl Copy for [MyType] {}
| ^^^^^^^^^^^^^^--------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | unsafe impl Send for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^------------------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -16,7 +16,7 @@ LL | unsafe impl Send for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^----------------
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -33,7 +33,7 @@ LL | unsafe impl Send for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^--------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -23,7 +23,7 @@ LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^----------------
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -46,7 +46,7 @@ LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^--------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -63,7 +63,7 @@ LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^------------------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl !Copy for str {}
| ^^^^^^^^^^^^^^^---
| | |
| | `str` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -16,7 +16,7 @@ LL | impl !Copy for fn() {}
| ^^^^^^^^^^^^^^^----
| | |
| | `fn()` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -27,7 +27,7 @@ LL | impl !Copy for () {}
| ^^^^^^^^^^^^^^^--
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -6,7 +6,7 @@ LL | impl TheTrait<usize> for isize {}
| | | |
| | | `isize` is not defined in the current crate
| | `usize` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -17,7 +17,7 @@ LL | impl !Send for Vec<isize> {}
| ^^^^^^^^^^^^^^^----------
| | |
| | `Vec` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl<T> Remote for lib::Pair<T,Foo> { }
| ^^^^^^^^^^^^^^^^^^^----------------
| | |
| | `Pair` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -6,7 +6,7 @@ LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { }
| | | |
| | | `i32` is not defined in the current crate
| | `Pair` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl<T,U> Remote for Pair<T,Local<U>> { }
| ^^^^^^^^^^^^^^^^^^^^^----------------
| | |
| | `Pair` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl<T> Remote for Vec<Local<T>> { }
| ^^^^^^^^^^^^^^^^^^^-------------
| | |
| | `Vec` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl Remote for Vec<Local> { }
| ^^^^^^^^^^^^^^^^----------
| | |
| | `Vec` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl lib::MyCopy for lib::MyStruct<MyType> { }
| ^^^^^^^^^^^^^^^^^^^^^---------------------
| | |
| | `MyStruct` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl lib::MyCopy for (MyType,) { }
| ^^^^^^^^^^^^^^^^^^^^^---------
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl Remote for i32 {
| ^^^^^^^^^^^^^^^^---
| | |
| | `i32` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -6,7 +6,7 @@ LL | impl Remote1<Rc<i32>> for i32 {
| | | |
| | | `i32` is not defined in the current crate
| | `Rc` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -18,7 +18,7 @@ LL | impl Remote1<Rc<Local>> for f64 {
| | | |
| | | `f64` is not defined in the current crate
| | `Rc` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -30,7 +30,7 @@ LL | impl<T> Remote1<Rc<T>> for f32 {
| | | |
| | | `f32` is not defined in the current crate
| | `Rc` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -6,7 +6,7 @@ LL | impl Remote for Box<i32> {
| | | |
| | | `i32` is not defined in the current crate
| | `std::alloc::Global` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -18,7 +18,7 @@ LL | impl<T> Remote for Box<Rc<T>> {
| | | |
| | | `Rc` is not defined in the current crate
| | `std::alloc::Global` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -6,7 +6,7 @@ LL | impl Remote1<u32> for f64 {
| | | |
| | | `f64` is not defined in the current crate
| | `u32` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -7,7 +7,7 @@ LL | impl Remote1<Box<String>> for i32 {
| | | `i32` is not defined in the current crate
| | `String` is not defined in the current crate
| | `std::alloc::Global` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -20,7 +20,7 @@ LL | impl Remote1<Box<Rc<i32>>> for f64 {
| | | `f64` is not defined in the current crate
| | `Rc` is not defined in the current crate
| | `std::alloc::Global` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -33,7 +33,7 @@ LL | impl<T> Remote1<Box<Rc<T>>> for f32 {
| | | `f32` is not defined in the current crate
| | `Rc` is not defined in the current crate
| | `std::alloc::Global` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl Remote for Rc<Local> {
| ^^^^^^^^^^^^^^^^---------
| | |
| | `Rc` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -16,7 +16,7 @@ LL | impl<T> Remote for Arc<T> {
| ^^^^^^^^^^^^^^^^^^^------
| | |
| | `Arc` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -11,7 +11,7 @@ LL | impl<'a> Drop for &'a mut isize {
| ^^^^^^^^^^^^^^^^^^-------------
| | |
| | `isize` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl Drop for u32 {}
| ^^^^^^^^^^^^^^---
| | |
| | `u32` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl<R> External for (Q, R) {}
| ^^^^^^^^^^^^^^^^^^^^^------
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,21 +5,21 @@
struct LocalType;
impl fmt::Display for *mut LocalType {
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
//~| NOTE impl doesn't use only types from inside the current crate
//~| NOTE `*mut LocalType` is not defined in the current crate because raw pointers are always foreign
//~| NOTE define and implement a trait or new type instead
//~| HELP consider introducing a new wrapper type
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
//~| NOTE impl doesn't use any uncovered types from inside the current crate
//~| NOTE `*mut LocalType` is not defined in the current crate because raw pointers are always foreign
//~| NOTE define and implement a trait or new type instead
//~| HELP consider introducing a new wrapper type
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "This not compile")
}
}
impl<T> marker::Copy for *mut T {
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
//~| NOTE impl doesn't use only types from inside the current crate
//~| NOTE `*mut T` is not defined in the current crate because raw pointers are always foreign
//~| NOTE define and implement a trait or new type instead
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
//~| NOTE impl doesn't use any uncovered types from inside the current crate
//~| NOTE `*mut T` is not defined in the current crate because raw pointers are always foreign
//~| NOTE define and implement a trait or new type instead
}
fn main() {}

View File

@ -5,7 +5,7 @@ LL | impl fmt::Display for *mut LocalType {
| ^^^^^^^^^^^^^^^^^^^^^^--------------
| | |
| | `*mut LocalType` is not defined in the current crate because raw pointers are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
help: consider introducing a new wrapper type
@ -22,7 +22,7 @@ LL | impl<T> marker::Copy for *mut T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^------
| | |
| | `*mut T` is not defined in the current crate because raw pointers are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -6,7 +6,7 @@ LL | impl std::ops::AddAssign for () {
| | | |
| | | this is not defined in the current crate because tuples are always foreign
| | this is not defined in the current crate because this is a foreign trait
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -18,7 +18,7 @@ LL | impl std::ops::AddAssign for [(); 1] {
| | | |
| | | this is not defined in the current crate because arrays are always foreign
| | this is not defined in the current crate because this is a foreign trait
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -30,7 +30,7 @@ LL | impl std::ops::AddAssign for &[u8] {
| | | |
| | | this is not defined in the current crate because slices are always foreign
| | this is not defined in the current crate because this is a foreign trait
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -33,7 +33,7 @@ LL | impl const std::ops::Add for i32 {
| | | |
| | | `i32` is not defined in the current crate
| | `i32` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl foreign_crate::ForeignTrait for AliasOfForeignType<()> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------
| | |
| | type alias impl trait is treated as if it were foreign, because its hidden type could be from a foreign crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl foreign_crate::ForeignTrait for AliasOfForeignType<()> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------
| | |
| | `AliasOfForeignType<()>` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl Eq for Y {}
| ^^^^^^^^^^^^-
| | |
| | `(u32) is 1..=` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead

View File

@ -5,7 +5,7 @@ LL | impl DefaultedTrait for (A,) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^----
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -16,7 +16,7 @@ LL | impl !DefaultedTrait for (B,) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^----
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead
@ -33,7 +33,7 @@ LL | impl DefaultedTrait for lib::Something<C> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^-----------------
| | |
| | `Something` is not defined in the current crate
| impl doesn't use only types from inside the current crate
| impl doesn't use any uncovered types from inside the current crate
|
= note: define and implement a trait or new type instead