summaryrefslogtreecommitdiffstats
path: root/tests/ui/single-use-lifetime/zero-uses-in-impl.rs
blob: 54803e1d2be4248dd652275b93f01b1d58addddb (plain)
1
2
3
4
5
6
7
8
9
10
// Test that we DO warn when lifetime name is not used at all.

#![deny(unused_lifetimes)]
#![allow(dead_code, unused_variables)]

struct Foo {}

impl<'a> Foo {} //~ ERROR `'a` never used

fn main() {}