Skip to content

Commit 2fd4cbb

Browse files
committed
Fix rebase
1 parent 0cf9613 commit 2fd4cbb

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Diff for: src/librustc/lint/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
724724
pub fn maybe_lint_level_root(tcx: TyCtxt<'_, '_, '_>, id: hir::HirId) -> bool {
725725
let attrs = tcx.hir().attrs_by_hir_id(id);
726726
for attr in attrs {
727-
if Level::from_str(&attr.name().as_str()).is_some() {
727+
if attr.ident_str().and_then(Level::from_str).is_some() {
728728
return true;
729729
}
730730
}

Diff for: src/librustc_lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ impl UnusedDocComment {
831831

832832
let span = sugared_span.take().unwrap_or_else(|| attr.span);
833833

834-
if attr.name() == "doc" {
834+
if attr.check_name("doc") {
835835
let mut err = cx.struct_span_lint(UNUSED_DOC_COMMENTS, span, "unused doc comment");
836836

837837
err.span_label(

Diff for: src/libsyntax/parse/attr.rs

-2
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,6 @@ impl<'a> Parser<'a> {
267267

268268
/// matches meta_item_inner : (meta_item | UNSUFFIXED_LIT) ;
269269
fn parse_meta_item_inner(&mut self) -> PResult<'a, ast::NestedMetaItem> {
270-
let lo = self.span;
271-
272270
match self.parse_unsuffixed_lit() {
273271
Ok(lit) => {
274272
return Ok(ast::NestedMetaItem::Literal(lit))

0 commit comments

Comments
 (0)