rust/src/test/compile-fail/extfmt-non-literal.rs
2011-09-01 18:54:03 -07:00

9 lines
225 B
Rust

// error-pattern: literal
fn main() {
// #fmt's first argument must be a literal. Hopefully this
// restriction can be eased eventually to just require a
// compile-time constant.
let x = #fmt["a" + "b"];
}