diff options
Diffstat (limited to 'tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs')
-rw-r--r-- | tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs new file mode 100644 index 000000000..09e5bbd84 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs @@ -0,0 +1,15 @@ +// revisions: rust2015 rust2018 +//[rust2018] edition:2018 + +trait WithType<T> {} +trait WithRegion<'a> { } + +trait Foo { } + +impl<T> Foo for Vec<T> +where + T: WithType<&u32> +//[rust2015,rust2018]~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} |