diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-37109.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-37109.rs b/src/test/ui/issues/issue-37109.rs new file mode 100644 index 000000000..1e57d5f95 --- /dev/null +++ b/src/test/ui/issues/issue-37109.rs @@ -0,0 +1,16 @@ +// run-pass +trait ToRef<'a> { + type Ref: 'a; +} + +impl<'a, U: 'a> ToRef<'a> for U { + type Ref = &'a U; +} + +fn example<'a, T>(value: &'a T) -> (<T as ToRef<'a>>::Ref, u32) { + (value, 0) +} + +fn main() { + example(&0); +} |