const DEFAULT_SPEC_FILE: &str = "foobar";
fn foo() {
let data = include_bytes!(DEFAULT_SPEC_FILE);
}
I think it is complaining that the input to include_bytes! is supposed to be a string constant. However, how much more can I make the string a constant?
As the error message says does include_bytes! want a string literal not a &'static str expression (other as the source code suggests). However, this is a built-in so I think the normal rules don't apply here.
in order to create not only these constants but also the "macrofied" versions of them: FOO!() and BAR!(), usable within other macros that expect string literals . For instance,