rust/src/test/compile-fail/minus-string.rs
Marijn Haverbeke 888262b337 Allow operator overloading of the indexing operator
The method `op_index` (which takes a single argument) is used for
this.

Issue #1520
2012-01-26 15:23:11 +01:00

3 lines
86 B
Rust

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