记录详情

Compile Error

error: macros that expand to items must be delimited with braces or followed by a semicolon
 --> /w/foo.rs:1:9
  |
1 | println!("Hello World")
  |         ^^^^^^^^^^^^^^^
  |
help: change the delimiters to curly braces
  |
1 | println!{"Hello World"}
  |         ~             ~
help: add a semicolon
  |
1 | println!("Hello World");
  |                        +

error: macro expansion ignores token `{` and any following
 --> /build/rustc-1.75.0-src/library/std/src/macros.rs:142:23
  |
 ::: /w/foo.rs:1:1
  |
1 | println!("Hello World")
  | ----------------------- caused by the macro expansion here
  |
  = note: the usage of `println!` is likely invalid in item context

error[E0601]: `main` function not found in crate `foo`
 --> /w/foo.rs:1:24
  |
1 | println!("Hello World")
  |                        ^ consider adding a `main` function to `/w/foo.rs`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0601`.

信息

递交者
类型
递交
题目
Hello World!
语言
Rust
递交时间
2024-03-28 13:19:46
评测时间
2024-03-28 13:19:46
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes