summaryrefslogtreecommitdiffstats
path: root/tests/ui/variance/variance-regions-unused-direct.rs
blob: 2afe012bdf22b65b649c9777810a197a6b33a229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Test that disallow lifetime parameters that are unused.

use std::marker;

struct Bivariant<'a>; //~ ERROR parameter `'a` is never used

struct Struct<'a, 'd> { //~ ERROR parameter `'d` is never used
    field: &'a [i32]
}

trait Trait<'a, 'd> { // OK on traits
    fn method(&'a self);
}

fn main() {}