#[redpen::disallow(T = "Pineapple")] #[redpen::disallow(T = "&Pineapple")] #[redpen::disallow(T = "std::string::String")] struct Pizza(T); struct Pineapple; type Alias = Pizza; //~ ERROR type Alias2 = Pizza; //~ ERROR fn foo(p: Pizza) -> Pizza { p } fn main() { let _ = Pizza(Pineapple); let _ = Pizza(String::new()); let _ = &vec!(Pizza(&Pizza(Pineapple))); let _ = &vec!(Pizza(&Pizza(&Pineapple))); }