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/libsyntax/ext | |
| parent | ed61bd869300df56e52338ba1ee36038159ad196 (diff) | |
| parent | 169fbed25179f223b730e1db5739e4a5a408ef31 (diff) | |
| download | rust-e3f047c8c558624e276ca36c5854b9fdcd4e5965.tar.gz rust-e3f047c8c558624e276ca36c5854b9fdcd4e5965.zip | |
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/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/mtwt.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/mtwt.rs b/src/libsyntax/ext/mtwt.rs index d7d768a007e..bebd803ac4f 100644 --- a/src/libsyntax/ext/mtwt.rs +++ b/src/libsyntax/ext/mtwt.rs @@ -66,7 +66,7 @@ pub fn apply_mark(m: Mrk, ctxt: SyntaxContext) -> SyntaxContext { /// Extend a syntax context with a given mark and sctable (explicit memoization) fn apply_mark_internal(m: Mrk, ctxt: SyntaxContext, table: &SCTable) -> SyntaxContext { let key = (ctxt, m); - * table.mark_memo.borrow_mut().entry(&key).get().unwrap_or_else( + * table.mark_memo.borrow_mut().entry(key).get().unwrap_or_else( |vacant_entry| vacant_entry.insert(idx_push(&mut *table.table.borrow_mut(), Mark(m, ctxt)))) } @@ -84,7 +84,7 @@ fn apply_rename_internal(id: Ident, table: &SCTable) -> SyntaxContext { let key = (ctxt, id, to); - * table.rename_memo.borrow_mut().entry(&key).get().unwrap_or_else( + * table.rename_memo.borrow_mut().entry(key).get().unwrap_or_else( |vacant_entry| vacant_entry.insert(idx_push(&mut *table.table.borrow_mut(), Rename(id, to, ctxt)))) } diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 581c60bdeb9..0f9d613cf13 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -219,7 +219,7 @@ pub fn nameize(p_s: &ParseSess, ms: &[TokenTree], res: &[Rc<NamedMatch>]) } } &TtToken(sp, MatchNt(bind_name, _, _, _)) => { - match ret_val.entry(&bind_name) { + match ret_val.entry(bind_name) { Vacant(spot) => { spot.insert(res[*idx].clone()); *idx += 1; |
