Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created July 16, 2019 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/aa4d14e5c75e53c31aa504313e996ac9 to your computer and use it in GitHub Desktop.
Save rust-play/aa4d14e5c75e53c31aa504313e996ac9 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
#![allow(unreachable_code)]
fn main() {
println!("{:?}", {
{ let a = [1, 2, 3, 4]; if a.len() > 3 { println!("{}", a[3] } }
});
}
/* ~~~~=== stderr ===~~~~
Compiling playground v0.0.1 (/playground)
error: incorrect close delimiter: `}`
--> src/main.rs:6:70
|
6 | { let a = [1, 2, 3, 4]; if a.len() > 3 { println!("{}", a[3] } }
| - - ^ incorrect close delimiter
| | |
| | un-closed delimiter
| close delimiter possibly meant for this
error: aborting due to previous error
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
*/
/* ~~~~=== stdout ===~~~~
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment