.span_label(item.span, &format!("impl doesn't use types inside crate"))
.note(&format!("the impl does not reference any types defined in \
this crate"))
+ .note("define and implement a trait or new type instead")
.emit();
return;
}
impl Drop for u32 {} //~ ERROR E0117
//~^ NOTE impl doesn't use types inside crate
//~| NOTE the impl does not reference any types defined in this crate
+//~| NOTE define and implement a trait or new type instead
fn main() {
}
//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
//~| NOTE impl doesn't use types inside crate
//~| NOTE the impl does not reference any types defined in this crate
+//~| NOTE define and implement a trait or new type instead
#[derive(Copy, Clone)]
struct Bar;
//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
//~| NOTE impl doesn't use types inside crate
//~| NOTE the impl does not reference any types defined in this crate
+//~| NOTE define and implement a trait or new type instead
impl Copy for &'static NotSync {}
//~^ ERROR the trait `Copy` may not be implemented for this type
//~^ ERROR the trait `Copy` may not be implemented for this type
//~| NOTE type is not a structure or enumeration
//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
-//~| NOTE impl doesn't use types inside crate
//~| NOTE the impl does not reference any types defined in this crate
+//~| NOTE define and implement a trait or new type instead
+//~| NOTE impl doesn't use types inside crate
impl Copy for &'static [NotSync] {}
//~^ ERROR the trait `Copy` may not be implemented for this type
//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
//~| NOTE impl doesn't use types inside crate
//~| NOTE the impl does not reference any types defined in this crate
+//~| NOTE define and implement a trait or new type instead
fn main() {
}