File is not included in module tree - They turn green on the Project structure

已回答

Hi there,

 After creating a rust library (cargo new my_project --lib), my objective is to add a .rs file.

After creating my new my_file.rs, I get the message:  File is not included in module tree, analysis is not available. Attach file to lib.rs

After complying, the file is added to lib.rs (mod my_file;). However on the Project structure they are green coloured, not red.

What does it mean? Should they be red?

Many thanks in advance,

0

Hey Serge, Thanks for your answer.

It seems git is working somehow. I have not set up the remote, but when I commit the file, it turns white.

It is OK to understand that the colour depends of the file state? Red: uncommitted. White: committed, Green: new uncommitted.... ?

Cheers,

0

Yes, Git integration works even if you don't have a remote set.

1

请先登录再写评论。