1 // Emit additional suggestion to correct the trait implementation
3 use std::{fmt, marker};
7 impl fmt::Display for *mut LocalType {
8 //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
9 //~| NOTE impl doesn't use only types from inside the current crate
10 //~| NOTE `*mut LocalType` is not defined in the current crate because raw pointers are always foreign
11 //~| NOTE define and implement a trait or new type instead
12 //~| HELP consider introducing a new wrapper type
13 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
14 write!(f, "This not compile")
18 impl<T> marker::Copy for *mut T {
19 //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
20 //~| NOTE impl doesn't use only types from inside the current crate
21 //~| NOTE `*mut T` is not defined in the current crate because raw pointers are always foreign
22 //~| NOTE define and implement a trait or new type instead