diff options
Diffstat (limited to 'tests/ui/impl-trait/universal_wrong_hrtb.rs')
-rw-r--r-- | tests/ui/impl-trait/universal_wrong_hrtb.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/universal_wrong_hrtb.rs b/tests/ui/impl-trait/universal_wrong_hrtb.rs new file mode 100644 index 000000000..b9551c2ce --- /dev/null +++ b/tests/ui/impl-trait/universal_wrong_hrtb.rs @@ -0,0 +1,8 @@ +trait Trait<'a> { + type Assoc; +} + +fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {} +//~^ ERROR `impl Trait` can only mention lifetimes bound at the fn or impl level + +fn main() {} |