summaryrefslogtreecommitdiffstats
path: root/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr
new file mode 100644
index 000000000..93b73c57e
--- /dev/null
+++ b/src/test/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: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:10: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:10: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:13: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:18: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:20: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:22:10
+ |
+LL | &...0 | _ => {}
+ | ^^^ help: use `..=` instead
+
+error: the range pattern here has ambiguous interpretation
+ --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:22: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`.