2015-02-12 05:16:02 -05:00
|
|
|
// 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]
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-31 19:58:01 -04:00
|
|
|
trait Trait<'a, 'd> { // OK on traits
|
2015-02-12 05:16:02 -05:00
|
|
|
fn method(&'a self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|