Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- struct Foo { x: i64 }; let foo = Foo { x: 0 }; println("{}", Foo)
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0423]: expected function, found macro `println`
- --> src/main.rs:6:56
- |
- 6 | struct Foo { x: i64 }; let foo = Foo { x: 0 }; println("{}", Foo)
- | ^^^^^^^ help: use `!` to invoke the macro: `println!`
- error[E0423]: expected value, found struct `Foo`
- --> src/main.rs:6:70
- |
- 6 | struct Foo { x: i64 }; let foo = Foo { x: 0 }; println("{}", Foo)
- | ^^^
- | |
- | did you mean `Foo { /* fields */ }`?
- | help: a local variable with a similar name exists: `foo`
- error: aborting due to 2 previous errors
- For more information about this error, try `rustc --explain E0423`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement