rust/tests/ui/variance/variance-unused-region-param.rs
2023-01-11 09:32:08 +00:00

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() {}