Created
March 29, 2013 20:31
-
-
Save Dretch/5273434 to your computer and use it in GitHub Desktop.
without the <'self> then rustc complains that 'self must be declared
This file contains hidden or 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 MyTrait { | |
fn foo(&self); | |
} | |
impl <'self> MyTrait for &'self str { | |
fn foo(&self) {} | |
} | |
fn main() {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment