diff options
Diffstat (limited to 'tests/ui/late-bound-lifetimes/issue-47511.rs')
-rw-r--r-- | tests/ui/late-bound-lifetimes/issue-47511.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/late-bound-lifetimes/issue-47511.rs b/tests/ui/late-bound-lifetimes/issue-47511.rs new file mode 100644 index 000000000..789443515 --- /dev/null +++ b/tests/ui/late-bound-lifetimes/issue-47511.rs @@ -0,0 +1,21 @@ +// check-pass + +fn f(_: X) -> X { + unimplemented!() +} + +fn g<'a>(_: X<'a>) -> X<'a> { + unimplemented!() +} + +type X<'a> = <&'a () as Trait>::Value; + +trait Trait { + type Value; +} + +impl<'a> Trait for &'a () { + type Value = (); +} + +fn main() {} |