summaryrefslogtreecommitdiffstats
path: root/tests/ui/variance/variance-unused-region-param.rs
blob: f0e4e03c9db8d4de61bea91aa173bed402ff49c4 (plain)
1
2
3
4
5
6
7
// 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() {}