diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-05 21:55:30 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-19 22:30:30 +0200 |
| commit | dc614b90ca9580eb9efd680648af28dce10e58a4 (patch) | |
| tree | 575b1ee87e14119f21c610811b5ad41015a52f7e | |
| parent | 87c841e19096f065d0e8a320c2c529b9d293da5d (diff) | |
| download | rust-dc614b90ca9580eb9efd680648af28dce10e58a4.tar.gz rust-dc614b90ca9580eb9efd680648af28dce10e58a4.zip | |
Make matches exhaustive.
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index f260713a18f..839e0fe1b50 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -1303,7 +1303,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { | LifetimeRibKind::AnonymousCreateParameter { .. } => { Some(LifetimeUseSet::One { use_span: ident.span, use_ctxt }) } - _ => None, + LifetimeRibKind::Generics { .. } + | LifetimeRibKind::ConstGeneric + | LifetimeRibKind::AnonConst => None, }) .unwrap_or(LifetimeUseSet::Many); debug!(?use_ctxt, ?use_set); @@ -1390,7 +1392,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { return; } LifetimeRibKind::Item => break, - _ => {} + LifetimeRibKind::Generics { .. } + | LifetimeRibKind::ConstGeneric + | LifetimeRibKind::AnonConst => {} } } // 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; } - _ => {} + LifetimeRibKind::Generics { .. } + | LifetimeRibKind::ConstGeneric + | LifetimeRibKind::AnonConst => {} } } |
