diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-02-01 21:53:25 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-02-05 13:45:01 -0500 |
| commit | 17bc7d8d5be3be9674d702ccad2fa88c487d23b0 (patch) | |
| tree | 325defba0f55b48273cd3f0814fe6c083dee5d41 /src/libsyntax/ext/tt | |
| parent | 2c05354211b04a52cc66a0b8ad8b2225eaf9e972 (diff) | |
| download | rust-17bc7d8d5be3be9674d702ccad2fa88c487d23b0.tar.gz rust-17bc7d8d5be3be9674d702ccad2fa88c487d23b0.zip | |
cleanup: replace `as[_mut]_slice()` calls with deref coercions
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index ac9f375e0a4..de61bdefa5d 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -319,11 +319,11 @@ fn check_matcher<'a, I>(cx: &mut ExtCtxt, matcher: I, follow: &Token) Some(&&TtToken(_, ref tok)) => tok.clone(), Some(&&TtSequence(sp, _)) => { cx.span_err(sp, - format!("`${0}:{1}` is followed by a \ - sequence repetition, which is not \ - allowed for `{1}` fragments", - name.as_str(), frag_spec.as_str()) - .as_slice()); + &format!("`${0}:{1}` is followed by a \ + sequence repetition, which is not \ + allowed for `{1}` fragments", + name.as_str(), frag_spec.as_str()) + ); Eof }, // die next iteration @@ -338,14 +338,14 @@ fn check_matcher<'a, I>(cx: &mut ExtCtxt, matcher: I, follow: &Token) (&Eof, _) => return Some((sp, tok.clone())), (_, Ok(true)) => continue, (next, Ok(false)) => { - cx.span_err(sp, format!("`${0}:{1}` is followed by `{2}`, which \ - is not allowed for `{1}` fragments", + cx.span_err(sp, &format!("`${0}:{1}` is followed by `{2}`, which \ + is not allowed for `{1}` fragments", name.as_str(), frag_spec.as_str(), - token_to_string(next)).as_slice()); + token_to_string(next))); continue }, (_, Err(msg)) => { - cx.span_err(sp, msg.as_slice()); + cx.span_err(sp, &msg); continue } } |
