rust/src/test/ui/range-inclusive-pattern-precedence.stderr
kennytm 6399d16cfd
Disallow &a..=b and box a..=b in pattern.
They are disallowed because they have different precedence than
expressions. I assume parenthesis in pattern will be soon stabilized and
thus write that as suggestion directly.
2018-03-15 16:58:03 +08:00

15 lines
512 B
Plaintext

error: the range pattern here has ambiguous interpretation
--> $DIR/range-inclusive-pattern-precedence.rs:23:10
|
LL | &10..=15 => {}
| ^^^^^^^ help: add parentheses to clarify the precedence: `(10 ..=15)`
error: the range pattern here has ambiguous interpretation
--> $DIR/range-inclusive-pattern-precedence.rs:32:13
|
LL | box 10..=15 => {}
| ^^^^^^^ help: add parentheses to clarify the precedence: `(10 ..=15)`
error: aborting due to 2 previous errors