diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:29:18 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:29:18 -0800 |
| commit | e3f047c8c558624e276ca36c5854b9fdcd4e5965 (patch) | |
| tree | 77e9e15864dd4466a9592fe6e26b6494e7e26c62 /src/librustc_resolve | |
| parent | ed61bd869300df56e52338ba1ee36038159ad196 (diff) | |
| parent | 169fbed25179f223b730e1db5739e4a5a408ef31 (diff) | |
rollup merge of #20653: alexcrichton/entry-unstable
There's been some debate over the precise form that these APIs should take, and they've undergone some changes recently, so these APIs are going to be left unstable for now to be fleshed out during the next release cycle.
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 653cdb1c42c..93ad69e03b1 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -1688,7 +1688,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)) @@ -2626,14 +2626,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 }); @@ -4710,7 +4710,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 |
