Skip to content

Commit ea6cc5a

Browse files
authored
Rollup merge of #80121 - LeSeulArtichaut:if-let-experimental, r=davidtwco
Change the message for `if_let_guard` feature gate `if-let` guards are now implemented by #79051 🎉 Thanks ``@camelid`` for pointing this out 🙂
2 parents 6340607 + 46e9212 commit ea6cc5a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) {
620620
}
621621
};
622622
}
623-
gate_all!(if_let_guard, "`if let` guard is not implemented");
623+
gate_all!(if_let_guard, "`if let` guards are experimental");
624624
gate_all!(let_chains, "`let` expressions in this position are experimental");
625625
gate_all!(async_closure, "async closures are unstable");
626626
gate_all!(generators, "yield syntax is experimental");

src/test/ui/rfc-2294-if-let-guard/feature-gate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::ops::Range;
55
fn _if_let_guard() {
66
match () {
77
() if let 0 = 1 => {}
8-
//~^ ERROR `if let` guard is not implemented
8+
//~^ ERROR `if let` guards are experimental
99

1010
() if (let 0 = 1) => {}
1111
//~^ ERROR `let` expressions in this position are experimental
@@ -74,7 +74,7 @@ fn _macros() {
7474
match () {
7575
#[cfg(FALSE)]
7676
() if let 0 = 1 => {}
77-
//~^ ERROR `if let` guard is not implemented
77+
//~^ ERROR `if let` guards are experimental
7878
_ => {}
7979
}
8080
use_expr!(let 0 = 1);

src/test/ui/rfc-2294-if-let-guard/feature-gate.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | macro_rules! use_expr {
77
LL | use_expr!(let 0 = 1);
88
| ^^^ no rules expected this token in macro call
99

10-
error[E0658]: `if let` guard is not implemented
10+
error[E0658]: `if let` guards are experimental
1111
--> $DIR/feature-gate.rs:7:12
1212
|
1313
LL | () if let 0 = 1 => {}
@@ -16,7 +16,7 @@ LL | () if let 0 = 1 => {}
1616
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
1717
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
1818

19-
error[E0658]: `if let` guard is not implemented
19+
error[E0658]: `if let` guards are experimental
2020
--> $DIR/feature-gate.rs:76:12
2121
|
2222
LL | () if let 0 = 1 => {}

0 commit comments

Comments
 (0)