-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix multiple expect
attribs in impl block
#114417
Whoa there!
You have triggered an abuse detection mechanism.
Please wait a few minutes before you try again;
in some cases this may take up to an hour.
Changes from 1 commit
b56a049
8ad46b4
7db9c3c
feb8002
67379c4
9bb55a0
bf4df06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Whoa there!
You have triggered an abuse detection mechanism.
Please wait a few minutes before you try again;
in some cases this may take up to an hour.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -829,12 +829,7 @@ impl<'tcx> DeadVisitor<'tcx> { | |
} | ||
}; | ||
|
||
self.tcx.emit_spanned_lint( | ||
lint, | ||
first_hir_id, | ||
MultiSpan::from_spans(spans), | ||
diag, | ||
); | ||
self.tcx.emit_spanned_lint(lint, first_hir_id, MultiSpan::from_spans(spans), diag); | ||
} | ||
|
||
fn warn_dead_code_grouped_by_lint_level( | ||
|
@@ -915,11 +910,7 @@ fn check_mod_deathness(tcx: TyCtxt<'_>, module: LocalDefId) { | |
let hir = tcx.hir().local_def_id_to_hir_id(def_id); | ||
let level = tcx.lint_level_at_node(lint::builtin::DEAD_CODE, hir).0; | ||
|
||
dead_items.push(DeadVariant { | ||
def_id, | ||
name, | ||
level, | ||
}) | ||
dead_items.push(DeadVariant { def_id, name, level }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what the right name would be for this. I renamed it to |
||
} | ||
} | ||
visitor.warn_dead_code_grouped_by_lint_level( | ||
|
@@ -982,7 +973,12 @@ fn check_mod_deathness(tcx: TyCtxt<'_>, module: LocalDefId) { | |
} | ||
}) | ||
.collect(); | ||
visitor.warn_dead_code_grouped_by_lint_level(def_id, "read", dead_fields, is_positional) | ||
visitor.warn_dead_code_grouped_by_lint_level( | ||
def_id, | ||
"read", | ||
dead_fields, | ||
is_positional, | ||
) | ||
} | ||
|
||
visitor.warn_dead_code_grouped_by_lint_level( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one can be named
warn_multiple
.