mirror of
https://git.proxmox.com/git/rustc
synced 2026-03-28 20:17:18 +00:00
17 lines
159 B
Rust
17 lines
159 B
Rust
//@ 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);
|
|
}
|