]> git.proxmox.com Git - rustc.git/blame - tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / regions / regions-free-region-outlives-static-outlives-free-region.rs
CommitLineData
b7449926 1// run-pass
0bf4aa26 2#![allow(dead_code)]
e9174d1e
SL
3// Test that we recognize that if you have
4//
5// 'a : 'static
6//
7// then
8//
9// 'a : 'b
d9579d0f 10
9ffffee4
FG
11#![warn(unused_lifetimes)]
12
e9174d1e 13fn test<'a,'b>(x: &'a i32) -> &'b i32
04454e1e 14 where 'a: 'static //~ WARN unnecessary lifetime parameter `'a`
e9174d1e
SL
15{
16 x
17}
223e47cc 18
e9174d1e 19fn main() { }