Merge remote-tracking branch 'upstream/master' into rustup
This commit is contained in:
commit
cc63143bbf
213 changed files with 3146 additions and 1693 deletions
|
|
@ -733,7 +733,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
|
|||
match stmt.value.kind {
|
||||
StmtKind::Let(local) => {
|
||||
bind!(self, local);
|
||||
kind!("Local({local})");
|
||||
kind!("Let({local})");
|
||||
self.option(field!(local.init), "init", |init| {
|
||||
self.expr(init);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ impl<'tcx> LateLintPass<'tcx> for LintWithoutLintPass {
|
|||
output: &mut self.registered_lints,
|
||||
cx,
|
||||
};
|
||||
let body_id = cx.tcx.hir().body_owned_by(
|
||||
let body = cx.tcx.hir().body_owned_by(
|
||||
impl_item_refs
|
||||
.iter()
|
||||
.find(|iiref| iiref.ident.as_str() == "get_lints")
|
||||
|
|
@ -222,7 +222,7 @@ impl<'tcx> LateLintPass<'tcx> for LintWithoutLintPass {
|
|||
.owner_id
|
||||
.def_id,
|
||||
);
|
||||
collector.visit_expr(cx.tcx.hir().body(body_id).value);
|
||||
collector.visit_expr(body.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -719,7 +719,7 @@ fn get_lint_group_and_level_or_lint(
|
|||
Some(sym::clippy),
|
||||
&std::iter::once(Ident::with_dummy_span(sym::clippy)).collect(),
|
||||
);
|
||||
if let CheckLintNameResult::Tool(Ok(lint_lst)) = result {
|
||||
if let CheckLintNameResult::Tool(lint_lst, None) = result {
|
||||
if let Some(group) = get_lint_group(cx, lint_lst[0]) {
|
||||
if EXCLUDED_LINT_GROUPS.contains(&group.as_str()) {
|
||||
return None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue