我有一个test.rs文件:
const TEST: &'static str = "Test.bin";
fn main() {
let x = include_bytes!(TEST);
}
运行 rustc test.rs 命令。
如何解决这个错误?
error: argument must be a string literal
--> test.rs:4:22
|
4 | let x = include_bytes!(TEST);
| ^^^^
let x = include_bytes!("test.bin");
- Denys Séguret