Created
October 11, 2014 05:34
-
-
Save gong023/f50c3a0b0a65c0151034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Hoge { | |
fn hoge(&self) ->int; | |
} | |
impl<T> Hoge for Vec<T> { | |
fn hoge(&self) -> int { 1i } | |
} | |
fn main() { | |
let v = vec!(1i, 2, 3); | |
v.hoge(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment