rust/tests/ui/lifetimes/shadow.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
200 B
Rust
Raw Normal View History

2017-11-17 00:59:45 -06:00
struct Foo<T>(T);
2022-02-09 20:42:32 -06:00
impl<'s> Foo<&'s u8> {
2017-11-20 06:13:27 -06:00
fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name
fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name
2017-11-17 00:59:45 -06:00
}
fn main() {}