These are chat archives for rust-lang/rust

Sep 2015
Sebastián Estévez
Sep 20 2015 18:48

Why does this work:

But this doesn't:
let name_desc:&'static str = "../www/index.html";


they're both the same type

Erik Hedvall
Sep 20 2015 18:56
Macros can't access the values of variables. They can't even know that it's a variable, because they will only read the syntax and not the meaning of it. include_str!(name_desc) is like saying "do something with this identifier and spit out some code".