Created
March 1, 2013 22:39
-
-
Save jld/5068511 to your computer and use it in GitHub Desktop.
Rust continues to have a bad day with side effects.
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
| struct S { x: int, y: int } | |
| fn main() { | |
| let w; | |
| let s = S { x: 1, y: 2 }; | |
| let _ = S { x: 3, ..({ w = "World"; s }) }; | |
| io::println(fmt!("Hello, %s!", w)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment