From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- ...alf-open-range-pats-ref-ambiguous-interp.stderr | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tests/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr (limited to 'tests/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr') diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr b/tests/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr new file mode 100644 index 000000000..111e81799 --- /dev/null +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr @@ -0,0 +1,55 @@ +error: the range pattern here has ambiguous interpretation + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:6:10 + | +LL | &0.. | _ => {} + | ^^^ help: add parentheses to clarify the precedence: `(0..)` + +error[E0586]: inclusive range with no end + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:8:11 + | +LL | &0..= | _ => {} + | ^^^ help: use `..` instead + | + = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + +error: the range pattern here has ambiguous interpretation + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:8:10 + | +LL | &0..= | _ => {} + | ^^^^ help: add parentheses to clarify the precedence: `(0..=)` + +error[E0586]: inclusive range with no end + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:11:11 + | +LL | &0... | _ => {} + | ^^^ help: use `..` instead + | + = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) + +error: the range pattern here has ambiguous interpretation + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:16:10 + | +LL | &..0 | _ => {} + | ^^^ help: add parentheses to clarify the precedence: `(..0)` + +error: the range pattern here has ambiguous interpretation + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:18:10 + | +LL | &..=0 | _ => {} + | ^^^^ help: add parentheses to clarify the precedence: `(..=0)` + +error: range-to patterns with `...` are not allowed + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:20:10 + | +LL | &...0 | _ => {} + | ^^^ help: use `..=` instead + +error: the range pattern here has ambiguous interpretation + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:20:10 + | +LL | &...0 | _ => {} + | ^^^^ help: add parentheses to clarify the precedence: `(..=0)` + +error: aborting due to 8 previous errors + +For more information about this error, try `rustc --explain E0586`. -- cgit v1.2.3