summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-27281.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-27281.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-27281.rs b/src/test/ui/issues/issue-27281.rs
new file mode 100644
index 000000000..717d8b2c2
--- /dev/null
+++ b/src/test/ui/issues/issue-27281.rs
@@ -0,0 +1,17 @@
+// check-pass
+pub trait Trait<'a> {
+ type T;
+ type U;
+ fn foo(&self, s: &'a ()) -> &'a ();
+}
+
+impl<'a> Trait<'a> for () {
+ type T = &'a ();
+ type U = Self::T;
+
+ fn foo(&self, s: &'a ()) -> &'a () {
+ let t: Self::T = s; t
+ }
+}
+
+fn main() {}