Rust:if this is intentional, prefix it with an underscore解决方法
编译Rust程序时提示:if this is intentional, prefix it with an underscore: `_x`
,这表明存在一个未使用的变量 x,你可以将其删除或在变量名前添加一个下划线前缀;
这是一个警告信息,不会影响编译;

添加下划线前缀:
let _x = 123;
编译Rust程序时提示:if this is intentional, prefix it with an underscore: `_x`
,这表明存在一个未使用的变量 x,你可以将其删除或在变量名前添加一个下划线前缀;
这是一个警告信息,不会影响编译;
添加下划线前缀:
let _x = 123;
推荐