]> git.lizzy.rs Git - rust.git/blob - src/test/ui/underscore-lifetime/where-clause-trait-impl-underscore.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / underscore-lifetime / where-clause-trait-impl-underscore.rs
1 // revisions: rust2015 rust2018
2 //[rust2018] edition:2018
3
4 trait WithType<T> {}
5 trait WithRegion<'a> { }
6
7 trait Foo { }
8
9 impl<T> Foo for Vec<T>
10 where
11     T: WithRegion<'_>
12 //[rust2015]~^ ERROR `'_` cannot be used here
13 //[rust2018]~^^ ERROR `'_` cannot be used here
14 { }
15
16 fn main() {}