diff options
Diffstat (limited to 'tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs')
-rw-r--r-- | tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs new file mode 100644 index 000000000..d7072aa11 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs @@ -0,0 +1,17 @@ +// run-rustfix + +trait WithType<T> {} +trait WithRegion<'a> { } + +#[allow(dead_code)] +struct Foo<T> { + t: T +} + +impl<T> Foo<T> +where + T: WithType<&u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} |