]> git.lizzy.rs Git - rust.git/blob - src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr
Stabilize half_open_range_patterns
[rust.git] / src / test / ui / half-open-range-patterns / half-open-range-pats-ref-ambiguous-interp.stderr
1 error: the range pattern here has ambiguous interpretation
2   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:6:10
3    |
4 LL |         &0.. | _ => {}
5    |          ^^^ help: add parentheses to clarify the precedence: `(0..)`
6
7 error[E0586]: inclusive range with no end
8   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:8:11
9    |
10 LL |         &0..= | _ => {}
11    |           ^^^ help: use `..` instead
12    |
13    = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
14
15 error: the range pattern here has ambiguous interpretation
16   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:8:10
17    |
18 LL |         &0..= | _ => {}
19    |          ^^^^ help: add parentheses to clarify the precedence: `(0..=)`
20
21 error[E0586]: inclusive range with no end
22   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:11:11
23    |
24 LL |         &0... | _ => {}
25    |           ^^^ help: use `..` instead
26    |
27    = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
28
29 error: the range pattern here has ambiguous interpretation
30   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:16:10
31    |
32 LL |         &..0 | _ => {}
33    |          ^^^ help: add parentheses to clarify the precedence: `(..0)`
34
35 error: the range pattern here has ambiguous interpretation
36   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:18:10
37    |
38 LL |         &..=0 | _ => {}
39    |          ^^^^ help: add parentheses to clarify the precedence: `(..=0)`
40
41 error: range-to patterns with `...` are not allowed
42   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:20:10
43    |
44 LL |         &...0 | _ => {}
45    |          ^^^ help: use `..=` instead
46
47 error: the range pattern here has ambiguous interpretation
48   --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:20:10
49    |
50 LL |         &...0 | _ => {}
51    |          ^^^^ help: add parentheses to clarify the precedence: `(..=0)`
52
53 error: aborting due to 8 previous errors
54
55 For more information about this error, try `rustc --explain E0586`.