Fallout of std::str stabilization
This commit is contained in:
@@ -97,7 +97,7 @@ impl AttrMetaMethods for MetaItem {
|
||||
|
||||
fn meta_item_list<'a>(&'a self) -> Option<&'a [P<MetaItem>]> {
|
||||
match self.node {
|
||||
MetaList(_, ref l) => Some(l.as_slice()),
|
||||
MetaList(_, ref l) => Some(l[]),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ impl AttributeMethods for Attribute {
|
||||
let meta = mk_name_value_item_str(
|
||||
InternedString::new("doc"),
|
||||
token::intern_and_get_ident(strip_doc_comment_decoration(
|
||||
comment.get()).as_slice()));
|
||||
comment.get())[]));
|
||||
if self.node.style == ast::AttrOuter {
|
||||
f(&mk_attr_outer(self.node.id, meta))
|
||||
} else {
|
||||
@@ -296,9 +296,9 @@ pub fn find_inline_attr(attrs: &[Attribute]) -> InlineAttr {
|
||||
}
|
||||
MetaList(ref n, ref items) if *n == "inline" => {
|
||||
mark_used(attr);
|
||||
if contains_name(items.as_slice(), "always") {
|
||||
if contains_name(items[], "always") {
|
||||
InlineAlways
|
||||
} else if contains_name(items.as_slice(), "never") {
|
||||
} else if contains_name(items[], "never") {
|
||||
InlineNever
|
||||
} else {
|
||||
InlineHint
|
||||
@@ -332,7 +332,7 @@ pub fn cfg_matches(diagnostic: &SpanHandler, cfgs: &[P<MetaItem>], cfg: &ast::Me
|
||||
!cfg_matches(diagnostic, cfgs, &*mis[0])
|
||||
}
|
||||
ast::MetaList(ref pred, _) => {
|
||||
diagnostic.span_err(cfg.span, format!("invalid predicate `{}`", pred).as_slice());
|
||||
diagnostic.span_err(cfg.span, format!("invalid predicate `{}`", pred)[]);
|
||||
false
|
||||
},
|
||||
ast::MetaWord(_) | ast::MetaNameValue(..) => contains(cfgs, cfg),
|
||||
@@ -396,8 +396,7 @@ pub fn require_unique_names(diagnostic: &SpanHandler, metas: &[P<MetaItem>]) {
|
||||
|
||||
if !set.insert(name.clone()) {
|
||||
diagnostic.span_fatal(meta.span,
|
||||
format!("duplicate meta item `{}`",
|
||||
name).as_slice());
|
||||
format!("duplicate meta item `{}`", name)[]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user