1
Fork 0

Change to Ty::is_inhabited_from

This commit is contained in:
Cameron Steffen 2022-10-23 17:32:17 -05:00
parent a6d96f9fd7
commit 34cbe72780
9 changed files with 73 additions and 81 deletions

View file

@ -201,9 +201,9 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
plural_len: usize,
) -> bool {
if ty.is_unit()
|| cx.tcx.is_ty_uninhabited_from(
|| !ty.is_inhabited_from(
cx.tcx,
cx.tcx.parent_module(expr.hir_id).to_def_id(),
ty,
cx.param_env,
)
{