2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-08-21 10:44:20 -05:00
|
|
|
// Test that we recognize that if you have
|
|
|
|
//
|
|
|
|
// 'a : 'static
|
|
|
|
//
|
|
|
|
// then
|
|
|
|
//
|
|
|
|
// 'a : 'b
|
|
|
|
|
2023-02-21 19:41:48 -06:00
|
|
|
#![warn(unused_lifetimes)]
|
|
|
|
|
2015-08-21 10:44:20 -05:00
|
|
|
fn test<'a,'b>(x: &'a i32) -> &'b i32
|
2022-03-14 09:56:37 -05:00
|
|
|
where 'a: 'static //~ WARN unnecessary lifetime parameter `'a`
|
2015-08-21 10:44:20 -05:00
|
|
|
{
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|