1
Fork 0

lowering: elide some lifetimes

This commit is contained in:
Mazdak Farrokhzad 2020-01-06 05:35:18 +01:00
parent bcab59ed83
commit 956265d55b
2 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,7 @@ pub(super) struct ItemLowerer<'a, 'lowering, 'hir> {
pub(super) lctx: &'a mut LoweringContext<'lowering, 'hir>,
}
impl<'a, 'lowering, 'hir> ItemLowerer<'a, 'lowering, 'hir> {
impl ItemLowerer<'_, '_, '_> {
fn with_trait_impl_ref(&mut self, impl_ref: &Option<TraitRef>, f: impl FnOnce(&mut Self)) {
let old = self.lctx.is_in_trait_impl;
self.lctx.is_in_trait_impl = if let &None = impl_ref { false } else { true };
@ -34,7 +34,7 @@ impl<'a, 'lowering, 'hir> ItemLowerer<'a, 'lowering, 'hir> {
}
}
impl<'a, 'lowering, 'hir> Visitor<'a> for ItemLowerer<'a, 'lowering, 'hir> {
impl<'a> Visitor<'a> for ItemLowerer<'a, '_, '_> {
fn visit_mod(&mut self, m: &'a Mod, _s: Span, _attrs: &[Attribute], n: NodeId) {
let hir_id = self.lctx.lower_node_id(n);

View file

@ -445,7 +445,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
}
}
impl<'tcx, 'lowering, 'hir> Visitor<'tcx> for MiscCollector<'tcx, 'lowering, 'hir> {
impl<'tcx> Visitor<'tcx> for MiscCollector<'tcx, '_, '_> {
fn visit_pat(&mut self, p: &'tcx Pat) {
if let PatKind::Paren(..) | PatKind::Rest = p.kind {
// Doesn't generate a HIR node