]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.rs
1 #![deny(single_use_lifetimes)]
3 #![allow(unused_variables)]
5 // Test that we DO warn for a lifetime used only once in an inherent method.
11 impl<'f
> Foo
<'f
> { //~ ERROR `'f` only used once
12 //~^ HELP elide the single-use lifetime
13 fn inherent_a
<'a
>(&self, data
: &'a
u32) { //~ ERROR `'a` only used once
14 //~^ HELP elide the single-use lifetime