fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1// run-rustfix 2 3#![feature(in_band_lifetimes)] 4#![deny(single_use_lifetimes)] 5#![allow(dead_code)] 6#![allow(unused_variables)] 7 8// Test that we DO warn when lifetime name is used only 9// once in a fn argument, even with in band lifetimes. 10 11fn a(x: &u32, y: &u32) { 12 //~^ ERROR `'a` only used once 13 //~| ERROR `'b` only used once 14 //~| HELP elide the single-use lifetime 15 //~| HELP elide the single-use lifetime 16} 17 18fn main() { }