Cargo error ( src /

When I type mv src / main.res it gives me this error

cannot perform `stat 'on'': The file or directory does not exist

Have you checked:

  1. That exists in the current directory?
  2. That the current directory contains a src/ directory that you can copy files into?

In src I have the in blue, and in hello_world I have the other

Another separate question, when I write code in it generates files like "tmp0fhfai", I don't know why they are generated when writing

The command you mentioned earlier, mv src/, will move in the current directory to src/ However, your later comment mentions is in the hello_world/ directory.

It sounds like you need to look at your current directory and figure out the correct paths for where you want to move the file to and where to move it from.

What are you using to write code? It might be that your editor/IDE has a plugin which automatically tries to build your code to make sure it is valid, and it's using a temporary file to store the results.

use sublime text 4

editor Cargo.toml, should I do this in the src / folder?, because it won't let me do it

Now I get this error when I want to create the main

[rispa1@rispa1 hola_mundo]$ rustc
error[E0601]: `main` function not found in crate `main`
  = note: consider adding a `main` function to ``

error: aborting due to previous error

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

Can you re-do this part of the book from the top ?

1 Like

Thanks I solved it

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.