diff options
Diffstat (limited to 'tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs')
-rw-r--r-- | tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs b/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs new file mode 100644 index 000000000..7c2e1aeee --- /dev/null +++ b/tests/ui/regions/regions-free-region-outlives-static-outlives-free-region.rs @@ -0,0 +1,17 @@ +// 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() { } |