summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-17662.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-17662.rs')
-rw-r--r--tests/ui/issues/issue-17662.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-17662.rs b/tests/ui/issues/issue-17662.rs
new file mode 100644
index 000000000..a2683808b
--- /dev/null
+++ b/tests/ui/issues/issue-17662.rs
@@ -0,0 +1,17 @@
+// run-pass
+// aux-build:issue-17662.rs
+
+
+extern crate issue_17662 as i;
+
+use std::marker;
+
+struct Bar<'a> { m: marker::PhantomData<&'a ()> }
+
+impl<'a> i::Foo<'a, usize> for Bar<'a> {
+ fn foo(&self) -> usize { 5 }
+}
+
+pub fn main() {
+ assert_eq!(i::foo(&Bar { m: marker::PhantomData }), 5);
+}