diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-14 23:05:01 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-19 12:59:40 -0700 |
| commit | 9d5d97b55d6487ee23b805bc1acbaa0669b82116 (patch) | |
| tree | b72dcf7045e331e94ea0f8658d088ab42d917935 /src/libsyntax/ext/tt | |
| parent | fb169d5543c84e11038ba2d07b538ec88fb49ca6 (diff) | |
| download | rust-9d5d97b55d6487ee23b805bc1acbaa0669b82116.tar.gz rust-9d5d97b55d6487ee23b805bc1acbaa0669b82116.zip | |
Remove a large amount of deprecated functionality
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 88376108fec..78fcd729aae 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -286,7 +286,7 @@ pub fn parse(sess: &ParseSess, // Only touch the binders we have actually bound for idx in range(ei.match_lo, ei.match_hi) { - let sub = (*ei.matches.get(idx)).clone(); + let sub = (ei.matches[idx]).clone(); new_pos.matches .get_mut(idx) .push(Rc::new(MatchedSeq(sub, mk_sp(ei.sp_lo, @@ -321,7 +321,7 @@ pub fn parse(sess: &ParseSess, eof_eis.push(ei); } } else { - match ei.elts.get(idx).node.clone() { + match ei.elts[idx].node.clone() { /* need to descend into sequence */ MatchSeq(ref matchers, ref sep, zero_ok, match_idx_lo, match_idx_hi) => { @@ -388,7 +388,7 @@ pub fn parse(sess: &ParseSess, if (bb_eis.len() > 0u && next_eis.len() > 0u) || bb_eis.len() > 1u { let nts = bb_eis.iter().map(|ei| { - match ei.elts.get(ei.idx).node { + match ei.elts[ei.idx].node { MatchNonterminal(bind, name, _) => { (format!("{} ('{}')", token::get_ident(name), @@ -413,7 +413,7 @@ pub fn parse(sess: &ParseSess, let mut rust_parser = Parser::new(sess, cfg.clone(), box rdr.clone()); let mut ei = bb_eis.pop().unwrap(); - match ei.elts.get(ei.idx).node { + match ei.elts[ei.idx].node { MatchNonterminal(_, name, idx) => { let name_string = token::get_ident(name); ei.matches.get_mut(idx).push(Rc::new(MatchedNonterminal( diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 7a7dbc54c9e..91db3a9d8df 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -255,12 +255,12 @@ pub fn add_new_extension<'cx>(cx: &'cx mut ExtCtxt, argument_gram); // Extract the arguments: - let lhses = match **argument_map.get(&lhs_nm) { + let lhses = match *argument_map[lhs_nm] { MatchedSeq(ref s, _) => /* FIXME (#2543) */ (*s).clone(), _ => cx.span_bug(sp, "wrong-structured lhs") }; - let rhses = match **argument_map.get(&rhs_nm) { + let rhses = match *argument_map[rhs_nm] { MatchedSeq(ref s, _) => /* FIXME (#2543) */ (*s).clone(), _ => cx.span_bug(sp, "wrong-structured rhs") }; diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 1b9f6f16542..35ec37d842a 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -79,7 +79,7 @@ fn lookup_cur_matched_by_matched(r: &TtReader, start: Rc<NamedMatch>) -> Rc<Name // end of the line; duplicate henceforth ad.clone() } - MatchedSeq(ref ads, _) => ads.get(*idx).clone() + MatchedSeq(ref ads, _) => ads[*idx].clone() } }) } @@ -194,7 +194,7 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan { let t = { let frame = r.stack.last().unwrap(); // FIXME(pcwalton): Bad copy. - (*frame.forest.get(frame.idx)).clone() + (*frame.forest)[frame.idx].clone() }; match t { TTDelim(tts) => { |
