summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs
blob: 46462c432a8c76f437e68c49e5a4fa311d090f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-pass
#![allow(dead_code)]
// Test that we recognize that if you have
//
//     'a : 'static
//
// then
//
//     'a : 'b

#![warn(unused_lifetimes)]

fn test<'a,'b>(x: &'a i32) -> &'b i32
    where 'a: 'static //~ WARN unnecessary lifetime parameter `'a`
{
    x
}

fn main() { }