]> git.lizzy.rs Git - rust.git/blob - src/test/ui/in-band-lifetimes/shadow.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / in-band-lifetimes / shadow.rs
1 #![allow(warnings)]
2 #![feature(in_band_lifetimes)]
3
4 struct Foo<T>(T);
5
6 impl Foo<&'s u8> {
7     fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name
8     fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name
9 }
10
11 fn main() {}