Do not suggest let_else
if no bindings would be introduced
This commit is contained in:
parent
0d92752b8a
commit
c3a998e82a
7 changed files with 1 additions and 45 deletions
|
@ -330,7 +330,7 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
|
|||
],
|
||||
Applicability::HasPlaceholders,
|
||||
);
|
||||
if cx.tcx.sess.is_nightly_build() {
|
||||
if !bindings.is_empty() && cx.tcx.sess.is_nightly_build() {
|
||||
err.span_suggestion_verbose(
|
||||
semi_span.shrink_to_lo(),
|
||||
&format!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue