Skip to content

Commit 824be1d

Browse files
committed
---
yaml --- r: 274943 b: refs/heads/stable c: 4af8564 h: refs/heads/master i: 274941: 1ac066c 274939: 47db235 274935: eeaa3eb 274927: 2003e74 274911: adf895e 274879: 9cc684a 274815: 22448c4 274687: fe0a373 274431: c19f067
1 parent 69615d7 commit 824be1d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: b7889ef23598524f310b8bb863271299bab628a6
32+
refs/heads/stable: 4af85643b13f9eae3de6fe15f06825c4d197752d
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_resolve/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ pub struct ModuleS<'a> {
798798
is_public: bool,
799799
is_extern_crate: bool,
800800

801-
children: RefCell<HashMap<(Name, Namespace), NameResolution<'a>>>,
801+
resolutions: RefCell<HashMap<(Name, Namespace), NameResolution<'a>>>,
802802
imports: RefCell<Vec<ImportDirective>>,
803803

804804
// The anonymous children of this node. Anonymous children are pseudo-
@@ -846,7 +846,7 @@ impl<'a> ModuleS<'a> {
846846
def: def,
847847
is_public: is_public,
848848
is_extern_crate: false,
849-
children: RefCell::new(HashMap::new()),
849+
resolutions: RefCell::new(HashMap::new()),
850850
imports: RefCell::new(Vec::new()),
851851
anonymous_children: RefCell::new(NodeMap()),
852852
shadowed_traits: RefCell::new(Vec::new()),
@@ -863,7 +863,7 @@ impl<'a> ModuleS<'a> {
863863
let glob_count =
864864
if allow_private_imports { self.glob_count.get() } else { self.pub_glob_count.get() };
865865

866-
self.children.borrow().get(&(name, ns)).cloned().unwrap_or_default().result(glob_count)
866+
self.resolutions.borrow().get(&(name, ns)).cloned().unwrap_or_default().result(glob_count)
867867
.and_then(|binding| {
868868
let allowed = allow_private_imports || !binding.is_import() || binding.is_public();
869869
if allowed { Success(binding) } else { Failed(None) }
@@ -873,7 +873,7 @@ impl<'a> ModuleS<'a> {
873873
// Define the name or return the existing binding if there is a collision.
874874
fn try_define_child(&self, name: Name, ns: Namespace, binding: &'a NameBinding<'a>)
875875
-> Result<(), &'a NameBinding<'a>> {
876-
let mut children = self.children.borrow_mut();
876+
let mut children = self.resolutions.borrow_mut();
877877
let resolution = children.entry((name, ns)).or_insert_with(Default::default);
878878

879879
// FIXME #31379: We can use methods from imported traits shadowed by non-import items
@@ -889,19 +889,19 @@ impl<'a> ModuleS<'a> {
889889
}
890890

891891
fn increment_outstanding_references_for(&self, name: Name, ns: Namespace) {
892-
let mut children = self.children.borrow_mut();
892+
let mut children = self.resolutions.borrow_mut();
893893
children.entry((name, ns)).or_insert_with(Default::default).outstanding_references += 1;
894894
}
895895

896896
fn decrement_outstanding_references_for(&self, name: Name, ns: Namespace) {
897-
match self.children.borrow_mut().get_mut(&(name, ns)).unwrap().outstanding_references {
897+
match self.resolutions.borrow_mut().get_mut(&(name, ns)).unwrap().outstanding_references {
898898
0 => panic!("No more outstanding references!"),
899899
ref mut outstanding_references => { *outstanding_references -= 1; }
900900
}
901901
}
902902

903903
fn for_each_child<F: FnMut(Name, Namespace, &'a NameBinding<'a>)>(&self, mut f: F) {
904-
for (&(name, ns), name_resolution) in self.children.borrow().iter() {
904+
for (&(name, ns), name_resolution) in self.resolutions.borrow().iter() {
905905
name_resolution.binding.map(|binding| f(name, ns, binding));
906906
}
907907
}

branches/stable/src/librustc_resolve/resolve_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> {
406406
match (&value_result, &type_result) {
407407
(&Indeterminate, _) | (_, &Indeterminate) => return Indeterminate,
408408
(&Failed(_), &Failed(_)) => {
409-
let children = target_module.children.borrow();
409+
let children = target_module.resolutions.borrow();
410410
let names = children.keys().map(|&(ref name, _)| name);
411411
let lev_suggestion = match find_best_match_for_name(names, &source.as_str(), None) {
412412
Some(name) => format!(". Did you mean to use `{}`?", name),

0 commit comments

Comments
 (0)