rust/tests/ui/minus-string.rs

4 lines
102 B
Rust

//@ error-pattern:cannot apply unary operator `-` to type `String`
fn main() { -"foo".to_string(); }