Created
November 7, 2013 19:13
-
-
Save larsbergstrom/7360256 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
struct Point {x: f64, y: f64} | |
fn get_x_sh_good<'r>(p: &'r Point) -> &'r f64 { | |
&p.x | |
} | |
fn test2() { | |
let s = @Point{x:1.0, y:2.0}; | |
let new_x = get_x_sh_good(s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment