Hello I need help

fn main() {
    println!("Hello world"!)
    
    

(Playground)

Errors:

   Compiling playground v0.0.1 (/playground)
error[E0765]: unterminated double quote string
 --> src/main.rs:2:14
  |
2 |       println!("Hello
  |  ______________^
3 | |     
  | |____^

For more information about this error, try `rustc --explain E0765`.
error: could not compile `playground` (bin "playground") due to 1 previous error

Ehm, well, this isn't proper Rust syntax you are showing us. Try these changes:

fn main() {
-    println!("Hello world"!)
+    println!("Hello world!");
+ }

Playground.

1 Like

Still, the shown code should not produce this error (and doesn't as you can test on the playground).

   Compiling playground v0.0.1 (/playground)
error: this file contains an unclosed delimiter
 --> src/main.rs:4:5
  |
1 | fn main() {
  |           - unclosed delimiter
...
4 |     
  |     ^

error: could not compile `playground` (bin "playground") due to 1 previous error
1 Like

You should wrap your text within a double quote like this "Hello World!", not "Hello World"!. Also, remember to add a ; at the end of line. Lastly, remember to close your block.