diff options
Diffstat (limited to 'src/test/ui/impl-trait/universal_wrong_hrtb.rs')
-rw-r--r-- | src/test/ui/impl-trait/universal_wrong_hrtb.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/universal_wrong_hrtb.rs b/src/test/ui/impl-trait/universal_wrong_hrtb.rs new file mode 100644 index 000000000..b9551c2ce --- /dev/null +++ b/src/test/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() {} |