rust/tests/compile-fail/strings.rs

13 lines
169 B
Rust
Raw Normal View History

#![feature(plugin)]
#![plugin(clippy)]
#![deny(string_add_assign)]
fn main() {
let x = "".to_owned();
for i in (1..3) {
x = x + "."; //~ERROR
}
}