mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
18 lines
259 B
Rust
18 lines
259 B
Rust
// run-pass
|
|
#![allow(dead_code)]
|
|
// Test that we recognize that if you have
|
|
//
|
|
// 'a : 'static
|
|
//
|
|
// then
|
|
//
|
|
// 'a : 'b
|
|
|
|
fn test<'a,'b>(x: &'a i32) -> &'b i32
|
|
where 'a: 'static //~ WARN unnecessary lifetime parameter `'a`
|
|
{
|
|
x
|
|
}
|
|
|
|
fn main() { }
|