Skip to content

Commit

Permalink
rename a method in Resolver trait
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Jan 9, 2020
1 parent 7472f9e commit b743af6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/librustc_ast_lowering/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ struct LoweringContext<'a, 'hir: 'a> {
pub trait Resolver {
fn def_key(&mut self, id: DefId) -> DefKey;

fn item_generics_cloned_untracked_liftimes(&self, def: DefId, sess: &Session) -> usize;
fn item_generics_num_liftimes(&self, def: DefId, sess: &Session) -> usize;

/// Obtains resolution for a `NodeId` with a single resolution.
fn get_partial_res(&mut self, id: NodeId) -> Option<PartialRes>;
Expand Down
4 changes: 1 addition & 3 deletions src/librustc_ast_lowering/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
return n;
}
assert!(!def_id.is_local());
let n = self
.resolver
.item_generics_cloned_untracked_liftimes(def_id, self.sess);
let n = self.resolver.item_generics_num_liftimes(def_id, self.sess);
self.type_def_lifetime_params.insert(def_id, n);
n
});
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ impl rustc_ast_lowering::Resolver for Resolver<'_> {
if id.is_local() { self.definitions().def_key(id.index) } else { self.cstore().def_key(id) }
}

fn item_generics_cloned_untracked_liftimes(&self, def_id: DefId, sess: &Session) -> usize {
fn item_generics_num_liftimes(&self, def_id: DefId, sess: &Session) -> usize {
self.cstore().item_generics_cloned_untracked(def_id, sess).own_counts().lifetimes
}

Expand Down

0 comments on commit b743af6

Please sign in to comment.