PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/compile-fail/extfmt-non-literal.rs

http://github.com/jruderman/rust
Rust | 8 lines | 3 code | 1 blank | 4 comment | 0 complexity | e08d244f0e91aed187e83b0cf45ccb6b MD5 | raw file
1// error-pattern: literal
2
3fn main() {
4    // #fmt's first argument must be a literal.  Hopefully this
5    // restriction can be eased eventually to just require a
6    // compile-time constant.
7    let x = fmt!{"a" + "b"};
8}