Replace equiv method calls with == operator sugar
This commit is contained in:
@@ -287,11 +287,11 @@ pub fn find_inline_attr(attrs: &[Attribute]) -> InlineAttr {
|
||||
// FIXME (#2809)---validate the usage of #[inline] and #[inline]
|
||||
attrs.iter().fold(InlineNone, |ia,attr| {
|
||||
match attr.node.value.node {
|
||||
MetaWord(ref n) if n.equiv(&("inline")) => {
|
||||
MetaWord(ref n) if *n == "inline" => {
|
||||
mark_used(attr);
|
||||
InlineHint
|
||||
}
|
||||
MetaList(ref n, ref items) if n.equiv(&("inline")) => {
|
||||
MetaList(ref n, ref items) if *n == "inline" => {
|
||||
mark_used(attr);
|
||||
if contains_name(items.as_slice(), "always") {
|
||||
InlineAlways
|
||||
@@ -409,7 +409,7 @@ pub fn require_unique_names(diagnostic: &SpanHandler, metas: &[P<MetaItem>]) {
|
||||
pub fn find_repr_attrs(diagnostic: &SpanHandler, attr: &Attribute) -> Vec<ReprAttr> {
|
||||
let mut acc = Vec::new();
|
||||
match attr.node.value.node {
|
||||
ast::MetaList(ref s, ref items) if s.equiv(&("repr")) => {
|
||||
ast::MetaList(ref s, ref items) if *s == "repr" => {
|
||||
mark_used(attr);
|
||||
for item in items.iter() {
|
||||
match item.node {
|
||||
|
||||
Reference in New Issue
Block a user