use modern everywhere

This commit is contained in:
Niko Matsakis 2019-08-12 18:14:48 -04:00
parent 18e54539ca
commit cbe8518407
2 changed files with 4 additions and 1 deletions

View file

@ -136,6 +136,9 @@ pub struct LoweringContext<'a> {
/// When `is_collectin_in_band_lifetimes` is true, each lifetime is checked
/// against this list to see if it is already in-scope, or if a definition
/// needs to be created for it.
///
/// We always store a `modern()` version of the param-name in this
/// vector.
in_scope_lifetimes: Vec<ParamName>,
current_module: NodeId,

View file

@ -123,7 +123,7 @@ impl LoweringContext<'_> {
_ => &[],
};
let lt_def_names = parent_generics.iter().filter_map(|param| match param.kind {
hir::GenericParamKind::Lifetime { .. } => Some(param.name),
hir::GenericParamKind::Lifetime { .. } => Some(param.name.modern()),
_ => None,
});
self.in_scope_lifetimes.extend(lt_def_names);