Fix rebase

This commit is contained in:
Vadim Petrochenkov 2019-03-11 00:24:15 +03:00
parent 0cf96131f4
commit 2fd4cbb3f2
3 changed files with 2 additions and 4 deletions

View file

@ -724,7 +724,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
pub fn maybe_lint_level_root(tcx: TyCtxt<'_, '_, '_>, id: hir::HirId) -> bool {
let attrs = tcx.hir().attrs_by_hir_id(id);
for attr in attrs {
if Level::from_str(&attr.name().as_str()).is_some() {
if attr.ident_str().and_then(Level::from_str).is_some() {
return true;
}
}

View file

@ -831,7 +831,7 @@ impl UnusedDocComment {
let span = sugared_span.take().unwrap_or_else(|| attr.span);
if attr.name() == "doc" {
if attr.check_name("doc") {
let mut err = cx.struct_span_lint(UNUSED_DOC_COMMENTS, span, "unused doc comment");
err.span_label(

View file

@ -267,8 +267,6 @@ impl<'a> Parser<'a> {
/// matches meta_item_inner : (meta_item | UNSUFFIXED_LIT) ;
fn parse_meta_item_inner(&mut self) -> PResult<'a, ast::NestedMetaItem> {
let lo = self.span;
match self.parse_unsuffixed_lit() {
Ok(lit) => {
return Ok(ast::NestedMetaItem::Literal(lit))