clear DefId when an expression's type changes to non-adt

This commit is contained in:
y21 2024-03-29 16:24:07 +01:00
parent 124e68bef8
commit 9f5d31ef86
2 changed files with 27 additions and 1 deletions

View file

@ -90,7 +90,7 @@ fn expr_type_certainty(cx: &LateContext<'_>, expr: &Expr<'_>) -> Certainty {
if let Some(def_id) = adt_def_id(expr_ty) {
certainty.with_def_id(def_id)
} else {
certainty
certainty.clear_def_id()
}
}