mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
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() {}
|