Created
April 5, 2016 01:40
-
-
Save kscz/c0b8d1317134afaed97818b73b249f2a to your computer and use it in GitHub Desktop.
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
fn main() { | |
println!("\"Yo Gandalf, how do we look?\", asked Frodo."); | |
println!("\"{}\" he replied", reference_eternal()); | |
} | |
// ERROR: rust can't figure out where the lifetime should come from! | |
fn reference_eternal() -> &str { | |
&"Fly, you fools!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment