1
Fork 0

lint: don't suggest assume_init for uninhabited types

This commit is contained in:
y21 2023-02-13 15:38:23 +01:00
parent 3eb5c4581a
commit 0610df9314
6 changed files with 32 additions and 59 deletions

View file

@ -2635,7 +2635,13 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
cx.emit_spanned_lint(
INVALID_VALUE,
expr.span,
BuiltinUnpermittedTypeInit { msg, ty: conjured_ty, label: expr.span, sub },
BuiltinUnpermittedTypeInit {
msg,
ty: conjured_ty,
label: expr.span,
sub,
tcx: cx.tcx,
},
);
}
}