about summary refs log tree commit diff
path: root/tests/ui/or-patterns/or-patterns-syntactic-fail.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-02 09:41:35 +0000
committerbors <bors@rust-lang.org>2023-05-02 09:41:35 +0000
commit98c33e47a495fbd7b22bce9ce32f2815991bc414 (patch)
tree5a29fad853f7fe163f7d7c70e31d0993039da2eb /tests/ui/or-patterns/or-patterns-syntactic-fail.rs
parent7b99493492ad59c7a44c65373558175db42b4151 (diff)
parent5d1796a608d387be784f17c28ec7c81f178a81eb (diff)
downloadrust-98c33e47a495fbd7b22bce9ce32f2815991bc414.tar.gz
rust-98c33e47a495fbd7b22bce9ce32f2815991bc414.zip
Auto merge of #109128 - chenyukang:yukang/remove-type-ascription, r=estebank
Remove type ascription from parser and diagnostics

Mostly based on https://github.com/rust-lang/rust/pull/106826

Part of #101728

r? `@estebank`
Diffstat (limited to 'tests/ui/or-patterns/or-patterns-syntactic-fail.rs')
-rw-r--r--tests/ui/or-patterns/or-patterns-syntactic-fail.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail.rs b/tests/ui/or-patterns/or-patterns-syntactic-fail.rs
index 358e9d034c4..23dbb57cbcf 100644
--- a/tests/ui/or-patterns/or-patterns-syntactic-fail.rs
+++ b/tests/ui/or-patterns/or-patterns-syntactic-fail.rs
@@ -8,9 +8,12 @@ use E::*;
 
 fn no_top_level_or_patterns() {
     // We do *not* allow or-patterns at the top level of lambdas...
-    let _ = |A | B: E| (); //~ ERROR no implementation for `E | ()`
+    let _ = |A | B: E| ();
+                           //~^ ERROR expected identifier, found
     //           -------- This looks like an or-pattern but is in fact `|A| (B: E | ())`.
+}
 
+fn no_top_level_or_patterns_2() {
     // ...and for now neither do we allow or-patterns at the top level of functions.
     fn fun1(A | B: E) {}
     //~^ ERROR top-level or-patterns are not allowed