You can add the #[allow(dead_code)] attribute to the struct definition like so:
#[allow(dead_code)]
struct SemanticDirection;
Or you can disable the warning for the entire file by adding the attribute at the top of the file, like so:
#![allow(dead_code)]
struct SemanticDirection;
But these attributes only work if you have the dead_code lint enabled. By default, the dead_code lint is enabled in Rust, but you can disable it by adding the following to the top of your code:
#![deny(dead_code)]
This will disable the dead_code lint for the entire file.
It's generally a good idea to keep the dead_code lint enabled, as it can help you catch mistakes in your code and ensure that you are not introducing unnecessary code into your project. However, it can be annoying when you are just experimenting and trying out different things, so it's understandable if you want to disable it in those cases.