8 lines
281 B
Rust
8 lines
281 B
Rust
// Test that we report an error for unused type parameters in types.
|
|
|
|
struct SomeStruct<'a> { x: u32 } //~ ERROR parameter `'a` is never used
|
|
enum SomeEnum<'a> { Nothing } //~ ERROR parameter `'a` is never used
|
|
trait SomeTrait<'a> { fn foo(&self); } // OK on traits.
|
|
|
|
fn main() {}
|