summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/rest-pat-semantic-disallowed.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/pattern/rest-pat-semantic-disallowed.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 'src/test/ui/pattern/rest-pat-semantic-disallowed.stderr')
-rw-r--r--src/test/ui/pattern/rest-pat-semantic-disallowed.stderr201
1 files changed, 201 insertions, 0 deletions
diff --git a/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr
new file mode 100644
index 000000000..e6a4e5f19
--- /dev/null
+++ b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr
@@ -0,0 +1,201 @@
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:10:13
+ |
+LL | () => { .. }
+ | ^^
+...
+LL | let mk_pat!();
+ | --------- in this macro invocation
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+ = note: this error originates in the macro `mk_pat` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:18:9
+ |
+LL | let ..;
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:21:13
+ |
+LL | let box ..;
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:25:13
+ |
+LL | 1 | .. => {}
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:29:10
+ |
+LL | let &..;
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:30:14
+ |
+LL | let &mut ..;
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:33:13
+ |
+LL | let x @ ..;
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:35:17
+ |
+LL | let ref x @ ..;
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:36:21
+ |
+LL | let ref mut x @ ..;
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` can only be used once per tuple pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:43:9
+ |
+LL | ..,
+ | -- previously used here
+LL | ..,
+ | ^^ can only be used once per tuple pattern
+
+error: `..` can only be used once per tuple pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:44:9
+ |
+LL | ..,
+ | -- previously used here
+LL | ..,
+LL | ..
+ | ^^ can only be used once per tuple pattern
+
+error: `..` can only be used once per tuple pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:49:9
+ |
+LL | ..,
+ | -- previously used here
+LL | x,
+LL | ..
+ | ^^ can only be used once per tuple pattern
+
+error: `..` can only be used once per tuple struct pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:59:9
+ |
+LL | ..,
+ | -- previously used here
+LL | ..,
+ | ^^ can only be used once per tuple struct pattern
+
+error: `..` can only be used once per tuple struct pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:60:9
+ |
+LL | ..,
+ | -- previously used here
+LL | ..,
+LL | ..
+ | ^^ can only be used once per tuple struct pattern
+
+error: `..` can only be used once per tuple struct pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:65:9
+ |
+LL | ..,
+ | -- previously used here
+LL | x,
+LL | ..
+ | ^^ can only be used once per tuple struct pattern
+
+error: `..` can only be used once per slice pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:73:9
+ |
+LL | ..,
+ | -- previously used here
+LL | ..,
+ | ^^ can only be used once per slice pattern
+
+error: `..` can only be used once per slice pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:74:9
+ |
+LL | ..,
+ | -- previously used here
+LL | ..,
+LL | ..
+ | ^^ can only be used once per slice pattern
+
+error: `..` can only be used once per slice pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:78:17
+ |
+LL | ..,
+ | -- previously used here
+LL | ref x @ ..,
+ | ^^ can only be used once per slice pattern
+
+error: `..` can only be used once per slice pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:79:21
+ |
+LL | ..,
+ | -- previously used here
+LL | ref x @ ..,
+LL | ref mut y @ ..,
+ | ^^ can only be used once per slice pattern
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:80:18
+ |
+LL | (ref z @ ..),
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error: `..` can only be used once per slice pattern
+ --> $DIR/rest-pat-semantic-disallowed.rs:81:9
+ |
+LL | ..,
+ | -- previously used here
+...
+LL | ..
+ | ^^ can only be used once per slice pattern
+
+error: `..` patterns are not allowed here
+ --> $DIR/rest-pat-semantic-disallowed.rs:17:12
+ |
+LL | fn foo(..: u8) {}
+ | ^^
+ |
+ = note: only allowed in tuple, tuple struct, and slice patterns
+
+error[E0282]: type annotations needed
+ --> $DIR/rest-pat-semantic-disallowed.rs:33:9
+ |
+LL | let x @ ..;
+ | ^^^^^^
+ |
+help: consider giving this pattern a type
+ |
+LL | let x @ ..: _;
+ | +++
+
+error: aborting due to 23 previous errors
+
+For more information about this error, try `rustc --explain E0282`.