Remove feature gate from let else suggestion

The let else suggestion added by 0d92752b8a
does not need a feature gate any more.
This commit is contained in:
est31 2022-05-16 06:27:31 +02:00
parent bca3cf7e86
commit 5633e863bd
9 changed files with 10 additions and 10 deletions

View File

@ -491,8 +491,8 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
err.span_suggestion_verbose(
semi_span.shrink_to_lo(),
&format!(
"alternatively, on nightly, you might want to use \
`#![feature(let_else)]` to handle the variant{} that {} matched",
"alternatively, you might want to use \
let else to handle the variant{} that {} matched",
pluralize!(witnesses.len()),
match witnesses.len() {
1 => "isn't",

View File

@ -18,7 +18,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | let u = if let Helper::U(u) = Helper::T(t, []) { u } else { todo!() };
| ++++++++++ ++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
LL | let Helper::U(u) = Helper::T(t, []) else { todo!() };
| ++++++++++++++++

View File

@ -19,7 +19,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | let y = if let Some(y) = x { y } else { todo!() };
| ++++++++++ ++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
LL | let Some(y) = x else { todo!() };
| ++++++++++++++++

View File

@ -19,7 +19,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | let _x = if let Ok(_x) = foo() { _x } else { todo!() };
| +++++++++++ +++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
LL | let Ok(_x) = foo() else { todo!() };
| ++++++++++++++++

View File

@ -21,7 +21,7 @@ help: you might want to use `if let` to ignore the variants that aren't matched
|
LL | let y = if let Thing::Foo(y) = Thing::Foo(1) { y } else { todo!() };
| ++++++++++ ++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variants that aren't matched
help: alternatively, you might want to use let else to handle the variants that aren't matched
|
LL | let Thing::Foo(y) = Thing::Foo(1) else { todo!() };
| ++++++++++++++++

View File

@ -187,7 +187,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | let _x = if let Opt::Some(ref _x) = e { _x } else { todo!() };
| +++++++++++ +++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
LL | let Opt::Some(ref _x) = e else { todo!() };
| ++++++++++++++++

View File

@ -19,7 +19,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | let x = if let Ok(x) = res { x } else { todo!() };
| ++++++++++ ++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
LL | let Ok(x) = res else { todo!() };
| ++++++++++++++++

View File

@ -18,7 +18,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | let (_y, _z) = if let Foo::D(_y, _z) = x { (_y, _z) } else { todo!() };
| +++++++++++++++++ +++++++++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
LL | let Foo::D(_y, _z) = x else { todo!() };
| ++++++++++++++++

View File

@ -122,7 +122,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | let x = if let Ok(x) = x { x } else { todo!() };
| ++++++++++ ++++++++++++++++++++++
help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
help: alternatively, you might want to use let else to handle the variant that isn't matched
|
LL | let Ok(x) = x else { todo!() };
| ++++++++++++++++