]> git.lizzy.rs Git - rust.git/blob - tests/ui/variance/variance-regions-unused-indirect.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / variance / variance-regions-unused-indirect.rs
1 // Test that disallow lifetime parameters that are unused.
2
3 enum Foo<'a> { //~ ERROR parameter `'a` is never used
4     //~^ ERROR recursive types `Foo` and `Bar` have infinite size
5     Foo1(Bar<'a>)
6 }
7
8 enum Bar<'a> { //~ ERROR parameter `'a` is never used
9     Bar1(Foo<'a>)
10 }
11
12 fn main() {}