#E0122: file include failed
include_str! / include_bytes! take one string path, relative to the file, of a file that can be read.
nabi
let s = include_str!("missing.txt");
error[E0122]: `include_str!` cannot read "missing.txt": no such file --> main.nabi:1:9 | 1 | let s = include_str!("missing.txt"); | ^^^^^^^^^^^
Create missing.txt next to main.nabi, or fix the path. The path is relative to the file that has the include_str!.
Related: E0125 cannot read or write a file
Found a mistake? Edit this page on GitHub. Last updated