summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/default-method/bound.rs
blob: 0855a9db85110bd3abff2a32a92b085986ce497e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass


trait A {
    fn g(&self) -> isize { 10 }
}

impl A for isize { }

fn f<T:A>(i: T) {
    assert_eq!(i.g(), 10);
}

pub fn main () {
    f(0);
}