Fixed incosistent_struct_constructor triggers in macro-generated code
This commit is contained in:
parent
faa97568a0
commit
61230f4cb8
1 changed files with 1 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ declare_lint_pass!(InconsistentStructConstructor => [INCONSISTENT_STRUCT_CONSTRU
|
|||
impl LateLintPass<'_> for InconsistentStructConstructor {
|
||||
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) {
|
||||
if_chain! {
|
||||
if !expr.span.from_expansion();
|
||||
if let ExprKind::Struct(qpath, fields, base) = expr.kind;
|
||||
let ty = cx.typeck_results().expr_ty(expr);
|
||||
if let Some(adt_def) = ty.ty_adt_def();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue