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;
原创内容,如需转载,请注明出处;
本文地址: https://www.perfcode.com/p/if-this-is-intentional-prefix-it-with-an-underscore.html
关注微信公众号,免费向我提问;