rust/tests/ui/traits/default-method/bound-subst2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
190 B
Rust
Raw Normal View History

//@ run-pass
trait A<T> {
fn g(&self, x: T) -> T { x }
}
impl A<isize> for isize { }
fn f<T, V: A<T>>(i: V, j: T) -> T {
2013-02-15 10:44:18 +00:00
i.g(j)
}
pub fn main () {
2015-01-25 21:05:03 +00:00
assert_eq!(f(0, 2), 2);
}