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