summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-17662.rs
blob: a2683808b523de33cc7dc945df51a49133d33e99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
}