rust/src/test/ui/minus-string.rs

4 lines
114 B
Rust
Raw Normal View History

2016-03-20 06:24:08 -05:00
// error-pattern:cannot apply unary operator `-` to type `std::string::String`
fn main() { -"foo".to_string(); }