【发布时间】:2014-11-10 16:56:01
【问题描述】:
struct SemanticDirection;
fn main() {}
warning: struct is never used: `SemanticDirection`
--> src/main.rs:1:1
|
1 | struct SemanticDirection;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
如果出现严重问题,我会重新打开这些警告,但我只是在修改语言,这让我很生气。
我尝试将#[allow(dead_code)] 添加到我的代码中,但没有成功。
【问题讨论】:
标签: warnings compiler-warnings rust dead-code