]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/or-patterns/feature-gate-or_patterns.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / or-patterns / feature-gate-or_patterns.stderr
index a9e43a4575da09d7c6f97d9098d284161a96c99e..7988af5b94213639ad4db93565ad7b211825b495 100644 (file)
@@ -1,3 +1,15 @@
+error: top-level or-patterns are not allowed in `let` bindings
+  --> $DIR/feature-gate-or_patterns.rs:28:9
+   |
+LL |     let | A | B;
+   |         ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
+
+error: top-level or-patterns are not allowed in `let` bindings
+  --> $DIR/feature-gate-or_patterns.rs:30:9
+   |
+LL |     let A | B;
+   |         ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
+
 error[E0658]: or-patterns syntax is experimental
   --> $DIR/feature-gate-or_patterns.rs:5:14
    |
@@ -8,16 +20,16 @@ LL |         Some(0 | 1 | 2) => {}
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:28:11
+  --> $DIR/feature-gate-or_patterns.rs:28:9
    |
 LL |     let | A | B;
-   |           ^^^^^
+   |         ^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:29:9
+  --> $DIR/feature-gate-or_patterns.rs:30:9
    |
 LL |     let A | B;
    |         ^^^^^
@@ -26,16 +38,16 @@ LL |     let A | B;
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:30:11
+  --> $DIR/feature-gate-or_patterns.rs:32:9
    |
 LL |     for | A | B in 0 {}
-   |           ^^^^^
+   |         ^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:31:9
+  --> $DIR/feature-gate-or_patterns.rs:33:9
    |
 LL |     for A | B in 0 {}
    |         ^^^^^
@@ -44,7 +56,7 @@ LL |     for A | B in 0 {}
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:32:13
+  --> $DIR/feature-gate-or_patterns.rs:34:13
    |
 LL |     fn fun((A | B): _) {}
    |             ^^^^^
@@ -53,7 +65,7 @@ LL |     fn fun((A | B): _) {}
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:33:15
+  --> $DIR/feature-gate-or_patterns.rs:35:15
    |
 LL |     let _ = |(A | B): u8| ();
    |               ^^^^^
@@ -62,7 +74,7 @@ LL |     let _ = |(A | B): u8| ();
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:34:10
+  --> $DIR/feature-gate-or_patterns.rs:36:10
    |
 LL |     let (A | B);
    |          ^^^^^
@@ -71,7 +83,7 @@ LL |     let (A | B);
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:35:10
+  --> $DIR/feature-gate-or_patterns.rs:37:10
    |
 LL |     let (A | B,);
    |          ^^^^^
@@ -80,7 +92,7 @@ LL |     let (A | B,);
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:36:11
+  --> $DIR/feature-gate-or_patterns.rs:38:11
    |
 LL |     let A(B | C);
    |           ^^^^^
@@ -89,7 +101,7 @@ LL |     let A(B | C);
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:37:14
+  --> $DIR/feature-gate-or_patterns.rs:39:14
    |
 LL |     let E::V(B | C);
    |              ^^^^^
@@ -98,7 +110,7 @@ LL |     let E::V(B | C);
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:38:17
+  --> $DIR/feature-gate-or_patterns.rs:40:17
    |
 LL |     let S { f1: B | C, f2 };
    |                 ^^^^^
@@ -107,7 +119,7 @@ LL |     let S { f1: B | C, f2 };
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:39:20
+  --> $DIR/feature-gate-or_patterns.rs:41:20
    |
 LL |     let E::V { f1: B | C, f2 };
    |                    ^^^^^
@@ -116,7 +128,7 @@ LL |     let E::V { f1: B | C, f2 };
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
 error[E0658]: or-patterns syntax is experimental
-  --> $DIR/feature-gate-or_patterns.rs:40:10
+  --> $DIR/feature-gate-or_patterns.rs:42:10
    |
 LL |     let [A | B];
    |          ^^^^^
@@ -169,6 +181,6 @@ LL | accept_pat!([p | q]);
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
    = help: add `#![feature(or_patterns)]` to the crate attributes to enable
 
-error: aborting due to 19 previous errors
+error: aborting due to 21 previous errors
 
 For more information about this error, try `rustc --explain E0658`.