diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-17662.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-17662.rs b/src/test/ui/issues/issue-17662.rs new file mode 100644 index 000000000..a2683808b --- /dev/null +++ b/src/test/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); +} |