]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-regions-unused-direct.rs
Rollup merge of #92642 - avborhanian:master, r=Dylan-DPC
[rust.git] / src / test / ui / variance / variance-regions-unused-direct.rs
1 // Test that disallow lifetime parameters that are unused.
2
3 use std::marker;
4
5 struct Bivariant<'a>; //~ ERROR parameter `'a` is never used
6
7 struct Struct<'a, 'd> { //~ ERROR parameter `'d` is never used
8     field: &'a [i32]
9 }
10
11 trait Trait<'a, 'd> { // OK on traits
12     fn method(&'a self);
13 }
14
15 fn main() {}