Cleanup feature gates.

This commit is contained in:
Camille GILLOT 2022-01-19 16:24:49 +01:00
parent 3c7947ee43
commit 27d8cd7db0
111 changed files with 236 additions and 272 deletions

View file

@ -5,8 +5,6 @@
// types of patterns that allow undelimited subpatterns that could cause the same ambiguity.
// Currently, those should be impossible due to precedence rule. This test enforces that.
#![feature(or_patterns)]
enum E {
A,
B,

View file

@ -1,35 +1,35 @@
error: top-level or-patterns are not allowed in `let` bindings
--> $DIR/nested-undelimited-precedence.rs:21:9
--> $DIR/nested-undelimited-precedence.rs:19:9
|
LL | let b @ A | B: E = A;
| ^^^^^^^^^ help: wrap the pattern in parentheses: `(b @ A | B)`
error: top-level or-patterns are not allowed in `let` bindings
--> $DIR/nested-undelimited-precedence.rs:36:9
--> $DIR/nested-undelimited-precedence.rs:34:9
|
LL | let &A(_) | B(_): F = A(3);
| ^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&A(_) | B(_))`
error: top-level or-patterns are not allowed in `let` bindings
--> $DIR/nested-undelimited-precedence.rs:38:9
--> $DIR/nested-undelimited-precedence.rs:36:9
|
LL | let &&A(_) | B(_): F = A(3);
| ^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&&A(_) | B(_))`
error: top-level or-patterns are not allowed in `let` bindings
--> $DIR/nested-undelimited-precedence.rs:40:9
--> $DIR/nested-undelimited-precedence.rs:38:9
|
LL | let &mut A(_) | B(_): F = A(3);
| ^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&mut A(_) | B(_))`
error: top-level or-patterns are not allowed in `let` bindings
--> $DIR/nested-undelimited-precedence.rs:42:9
--> $DIR/nested-undelimited-precedence.rs:40:9
|
LL | let &&mut A(_) | B(_): F = A(3);
| ^^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&&mut A(_) | B(_))`
error[E0408]: variable `b` is not bound in all patterns
--> $DIR/nested-undelimited-precedence.rs:21:17
--> $DIR/nested-undelimited-precedence.rs:19:17
|
LL | let b @ A | B: E = A;
| - ^ pattern doesn't bind `b`
@ -37,7 +37,7 @@ LL | let b @ A | B: E = A;
| variable not in all patterns
error[E0308]: mismatched types
--> $DIR/nested-undelimited-precedence.rs:36:9
--> $DIR/nested-undelimited-precedence.rs:34:9
|
LL | let &A(_) | B(_): F = A(3);
| ^^^^^ - expected due to this
@ -48,7 +48,7 @@ LL | let &A(_) | B(_): F = A(3);
found reference `&_`
error[E0308]: mismatched types
--> $DIR/nested-undelimited-precedence.rs:38:9
--> $DIR/nested-undelimited-precedence.rs:36:9
|
LL | let &&A(_) | B(_): F = A(3);
| ^^^^^^ - expected due to this
@ -59,7 +59,7 @@ LL | let &&A(_) | B(_): F = A(3);
found reference `&_`
error[E0308]: mismatched types
--> $DIR/nested-undelimited-precedence.rs:40:9
--> $DIR/nested-undelimited-precedence.rs:38:9
|
LL | let &mut A(_) | B(_): F = A(3);
| ^^^^^^^^^ - expected due to this
@ -70,7 +70,7 @@ LL | let &mut A(_) | B(_): F = A(3);
found mutable reference `&mut _`
error[E0308]: mismatched types
--> $DIR/nested-undelimited-precedence.rs:42:9
--> $DIR/nested-undelimited-precedence.rs:40:9
|
LL | let &&mut A(_) | B(_): F = A(3);
| ^^^^^^^^^^ - expected due to this

View file

@ -2,8 +2,6 @@
// edition:2018
#![feature(or_patterns)]
fn main() {}
// Test the `pat` macro fragment parser:

View file

@ -1,5 +1,5 @@
error: no rules expected the token `|`
--> $DIR/or-patterns-syntactic-fail-2018.rs:14:15
--> $DIR/or-patterns-syntactic-fail-2018.rs:12:15
|
LL | macro_rules! accept_pat {
| ----------------------- when calling this macro
@ -8,7 +8,7 @@ LL | accept_pat!(p | q);
| ^ no rules expected this token in macro call
error: no rules expected the token `|`
--> $DIR/or-patterns-syntactic-fail-2018.rs:15:13
--> $DIR/or-patterns-syntactic-fail-2018.rs:13:13
|
LL | macro_rules! accept_pat {
| ----------------------- when calling this macro