]> git.lizzy.rs Git - rust.git/blob - src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.fixed
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / single-use-lifetime / one-use-in-fn-argument-in-band.fixed
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
11 fn 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
18 fn main() { }