Suppress erroneous suggestion
The suggestion to use `let else` with an uninitialized refutable `let` statement was erroneous: `let else` cannot be used with deferred initialization.
This commit is contained in:
parent
ab71ee7a92
commit
ddcfb94b84
6 changed files with 22 additions and 48 deletions
|
@ -674,6 +674,7 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
|
|||
if let Some(span) = sp
|
||||
&& self.tcx.sess.source_map().is_span_accessible(span)
|
||||
&& interpreted_as_const.is_none()
|
||||
&& scrut.is_some()
|
||||
{
|
||||
let mut bindings = vec![];
|
||||
pat.each_binding(|name, _, _, _| bindings.push(name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue