diff options
| author | Dylan Ede <dylanede@googlemail.com> | 2015-01-06 16:36:30 +0000 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 11:59:26 -0800 |
| commit | 25eada15740fbe12ee2cae7fc6fe8e2c228b699d (patch) | |
| tree | bc24dedaf97ab376c4ac4f73b4c40d068c5ef84b /src/librustc_resolve | |
| parent | 6539cb417f4a7c2d9d1afce44c196578d2b67f38 (diff) | |
[breaking change] Revert Entry behaviour to take keys by value.
Diffstat (limited to 'src/librustc_resolve')
| -rw-r--r-- | src/librustc_resolve/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 58102fe5629..1927f204bc6 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -1701,7 +1701,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { let is_public = import_directive.is_public; let mut import_resolutions = module_.import_resolutions.borrow_mut(); - let dest_import_resolution = import_resolutions.entry(&name).get().unwrap_or_else( + let dest_import_resolution = import_resolutions.entry(name).get().unwrap_or_else( |vacant_entry| { // Create a new import resolution from this child. vacant_entry.insert(ImportResolution::new(id, is_public)) @@ -2639,14 +2639,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { def = DefUpvar(node_id, function_id, last_proc_body_id); let mut seen = self.freevars_seen.borrow_mut(); - let seen = match seen.entry(&function_id) { + let seen = match seen.entry(function_id) { Occupied(v) => v.into_mut(), Vacant(v) => v.insert(NodeSet::new()), }; if seen.contains(&node_id) { continue; } - match self.freevars.borrow_mut().entry(&function_id) { + match self.freevars.borrow_mut().entry(function_id) { Occupied(v) => v.into_mut(), Vacant(v) => v.insert(vec![]), }.push(Freevar { def: prev_def, span: span }); @@ -4723,7 +4723,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { "Import should only be used for `use` directives"); self.last_private.insert(node_id, lp); - match self.def_map.borrow_mut().entry(&node_id) { + match self.def_map.borrow_mut().entry(node_id) { // Resolve appears to "resolve" the same ID multiple // times, so here is a sanity check it at least comes to // the same conclusion! - nmatsakis |
