Skip to content

Instantly share code, notes, and snippets.

Created February 6, 2018 01:10
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 anonymous/158fd327ad1bc1c19147bc5369ba5c0d to your computer and use it in GitHub Desktop.
Save anonymous/158fd327ad1bc1c19147bc5369ba5c0d to your computer and use it in GitHub Desktop.
Rust code shared from the playground
#[macro_use]
extern crate lazy_static;
// Just to make the compiler happy on play.rust-lang.org
struct Logger {counter: i32 }
lazy_static! {
// You missed the word `ref`
static ref LOGGER: Logger = Logger{counter: 0};
// ^^^^^^
// error: no rules expected the token `LOGGER`
}
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment