diff options
| author | bors <bors@rust-lang.org> | 2015-02-05 19:00:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-05 19:00:13 +0000 |
| commit | 189930fcae287565dcef856ae8d60a83190a4b92 (patch) | |
| tree | 325defba0f55b48273cd3f0814fe6c083dee5d41 /src/libsyntax/ext | |
| parent | 2c05354211b04a52cc66a0b8ad8b2225eaf9e972 (diff) | |
| parent | 17bc7d8d5be3be9674d702ccad2fa88c487d23b0 (diff) | |
| download | rust-189930fcae287565dcef856ae8d60a83190a4b92.tar.gz rust-189930fcae287565dcef856ae8d60a83190a4b92.zip | |
Auto merge of #21916 - japaric:no-as-slice, r=alexcrichton
r? @alexcrichton cc @eddyb
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/cfg.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/cfg_attr.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/bounds.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/ty.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 18 |
6 files changed, 18 insertions, 18 deletions
diff --git a/src/libsyntax/ext/cfg.rs b/src/libsyntax/ext/cfg.rs index 72da60ffe09..7216602071b 100644 --- a/src/libsyntax/ext/cfg.rs +++ b/src/libsyntax/ext/cfg.rs @@ -34,6 +34,6 @@ pub fn expand_cfg<'cx>(cx: &mut ExtCtxt, return DummyResult::expr(sp); } - let matches_cfg = attr::cfg_matches(&cx.parse_sess.span_diagnostic, cx.cfg.as_slice(), &*cfg); + let matches_cfg = attr::cfg_matches(&cx.parse_sess.span_diagnostic, &cx.cfg, &*cfg); MacExpr::new(cx.expr_bool(sp, matches_cfg)) } diff --git a/src/libsyntax/ext/cfg_attr.rs b/src/libsyntax/ext/cfg_attr.rs index a85f12edb22..72eaa3e47be 100644 --- a/src/libsyntax/ext/cfg_attr.rs +++ b/src/libsyntax/ext/cfg_attr.rs @@ -25,7 +25,7 @@ pub fn expand(cx: &mut ExtCtxt, sp: Span, mi: &ast::MetaItem, it: P<ast::Item>) }; let mut out = (*it).clone(); - if attr::cfg_matches(&cx.parse_sess.span_diagnostic, cx.cfg.as_slice(), &**cfg) { + if attr::cfg_matches(&cx.parse_sess.span_diagnostic, &cx.cfg, &**cfg) { out.attrs.push(cx.attribute(attr.span, attr.clone())); } diff --git a/src/libsyntax/ext/deriving/bounds.rs b/src/libsyntax/ext/deriving/bounds.rs index 9c85d3d28a7..bce48747b60 100644 --- a/src/libsyntax/ext/deriving/bounds.rs +++ b/src/libsyntax/ext/deriving/bounds.rs @@ -28,14 +28,14 @@ pub fn expand_deriving_bound<F>(cx: &mut ExtCtxt, "Copy" => "Copy", "Send" | "Sync" => { return cx.span_err(span, - format!("{} is an unsafe trait and it \ - should be implemented explicitly", - *tname).as_slice()) + &format!("{} is an unsafe trait and it \ + should be implemented explicitly", + *tname)) } ref tname => { cx.span_bug(span, - format!("expected built-in trait name but \ - found {}", *tname).as_slice()) + &format!("expected built-in trait name but \ + found {}", *tname)) } } }, diff --git a/src/libsyntax/ext/deriving/generic/ty.rs b/src/libsyntax/ext/deriving/generic/ty.rs index 85682d41b5f..bbca5c599b1 100644 --- a/src/libsyntax/ext/deriving/generic/ty.rs +++ b/src/libsyntax/ext/deriving/generic/ty.rs @@ -247,7 +247,7 @@ impl<'a> LifetimeBounds<'a> { mk_ty_param(cx, span, *name, - bounds.as_slice(), + bounds, self_ty, self_generics) } diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index fbacc750390..eaee67f9a61 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -664,7 +664,7 @@ pub fn expand_item_mac(it: P<ast::Item>, id: ast::DUMMY_NODE_ID, span: it.span, imported_from: None, - export: attr::contains_name(it.attrs.as_slice(), "macro_export"), + export: attr::contains_name(&it.attrs, "macro_export"), use_locally: true, body: tts, }; 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 } } |
