1
Fork 0

Refactor MetaItemKind to use Names instead of InternedStrings.

This commit is contained in:
Jeffrey Seyfried 2016-11-15 04:34:52 +00:00
parent ff4994235a
commit a2626410d7
33 changed files with 187 additions and 206 deletions

View file

@ -64,7 +64,7 @@ impl<'a> CheckAttrVisitor<'a> {
None => continue,
};
let (message, label) = match &*name {
let (message, label) = match &*name.as_str() {
"C" => {
conflicting_reprs += 1;
if target != Target::Struct &&
@ -120,7 +120,7 @@ impl<'a> CheckAttrVisitor<'a> {
}
fn check_attribute(&self, attr: &ast::Attribute, target: Target) {
let name: &str = &attr.name();
let name: &str = &attr.name().as_str();
match name {
"inline" => self.check_inline(attr, target),
"repr" => self.check_repr(attr, target),