]> git.lizzy.rs Git - rust.git/commitdiff
Change the message for `if_let_guard` feature gate
authorLeSeulArtichaut <leseulartichaut@gmail.com>
Thu, 17 Dec 2020 15:56:59 +0000 (16:56 +0100)
committerLeSeulArtichaut <leseulartichaut@gmail.com>
Thu, 17 Dec 2020 16:08:18 +0000 (17:08 +0100)
compiler/rustc_ast_passes/src/feature_gate.rs
src/test/ui/rfc-2294-if-let-guard/feature-gate.rs
src/test/ui/rfc-2294-if-let-guard/feature-gate.stderr

index 9d54d89e080f59c3f081f7914f33db8bf3e4ae42..bb222675239aa82c524bdcc8a3410f5287846645 100644 (file)
@@ -620,7 +620,7 @@ macro_rules! gate_all {
             }
         };
     }
-    gate_all!(if_let_guard, "`if let` guard is not implemented");
+    gate_all!(if_let_guard, "`if let` guards are experimental");
     gate_all!(let_chains, "`let` expressions in this position are experimental");
     gate_all!(async_closure, "async closures are unstable");
     gate_all!(generators, "yield syntax is experimental");
index 311d1afcfc0eefe90eee7e903470de6ee47b492c..4ba7e1eeefaa6bc00e4f59d119c00e5395bb7bed 100644 (file)
@@ -5,7 +5,7 @@
 fn _if_let_guard() {
     match () {
         () if let 0 = 1 => {}
-        //~^ ERROR `if let` guard is not implemented
+        //~^ ERROR `if let` guards are experimental
 
         () if (let 0 = 1) => {}
         //~^ ERROR `let` expressions in this position are experimental
@@ -74,7 +74,7 @@ macro_rules! use_expr {
     match () {
         #[cfg(FALSE)]
         () if let 0 = 1 => {}
-        //~^ ERROR `if let` guard is not implemented
+        //~^ ERROR `if let` guards are experimental
         _ => {}
     }
     use_expr!(let 0 = 1);
index 1670078e0d38b6f9ce64f03ba003c7c6096893a4..113870c19f5d5a95fbfd79961763eae6e4b0b61b 100644 (file)
@@ -7,7 +7,7 @@ LL |     macro_rules! use_expr {
 LL |     use_expr!(let 0 = 1);
    |               ^^^ no rules expected this token in macro call
 
-error[E0658]: `if let` guard is not implemented
+error[E0658]: `if let` guards are experimental
   --> $DIR/feature-gate.rs:7:12
    |
 LL |         () if let 0 = 1 => {}
@@ -16,7 +16,7 @@ LL |         () if let 0 = 1 => {}
    = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
    = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
 
-error[E0658]: `if let` guard is not implemented
+error[E0658]: `if let` guards are experimental
   --> $DIR/feature-gate.rs:76:12
    |
 LL |         () if let 0 = 1 => {}