Make matches exhaustive.
This commit is contained in:
parent
87c841e190
commit
dc614b90ca
@ -1303,7 +1303,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
|||||||
| LifetimeRibKind::AnonymousCreateParameter { .. } => {
|
| LifetimeRibKind::AnonymousCreateParameter { .. } => {
|
||||||
Some(LifetimeUseSet::One { use_span: ident.span, use_ctxt })
|
Some(LifetimeUseSet::One { use_span: ident.span, use_ctxt })
|
||||||
}
|
}
|
||||||
_ => None,
|
LifetimeRibKind::Generics { .. }
|
||||||
|
| LifetimeRibKind::ConstGeneric
|
||||||
|
| LifetimeRibKind::AnonConst => None,
|
||||||
})
|
})
|
||||||
.unwrap_or(LifetimeUseSet::Many);
|
.unwrap_or(LifetimeUseSet::Many);
|
||||||
debug!(?use_ctxt, ?use_set);
|
debug!(?use_ctxt, ?use_set);
|
||||||
@ -1390,7 +1392,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LifetimeRibKind::Item => break,
|
LifetimeRibKind::Item => break,
|
||||||
_ => {}
|
LifetimeRibKind::Generics { .. }
|
||||||
|
| LifetimeRibKind::ConstGeneric
|
||||||
|
| LifetimeRibKind::AnonConst => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// This resolution is wrong, it passes the work to HIR lifetime resolution.
|
// This resolution is wrong, it passes the work to HIR lifetime resolution.
|
||||||
@ -1576,7 +1580,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_ => {}
|
LifetimeRibKind::Generics { .. }
|
||||||
|
| LifetimeRibKind::ConstGeneric
|
||||||
|
| LifetimeRibKind::AnonConst => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user