]> git.lizzy.rs Git - rust.git/blob - src/test/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / underscore-lifetime / where-clause-inherent-impl-ampersand.rs
1 // revisions: rust2015 rust2018
2 //[rust2018] edition:2018
3
4 trait WithType<T> {}
5 trait WithRegion<'a> { }
6
7 struct Foo<T> {
8     t: T
9 }
10
11 impl<T> Foo<T>
12 where
13     T: WithType<&u32>
14 //[rust2015]~^ ERROR `&` without an explicit lifetime name cannot be used here
15 //[rust2018]~^^ ERROR `&` without an explicit lifetime name cannot be used here
16 { }
17
18 fn main() {}