Change to Ty::is_inhabited_from
This commit is contained in:
parent
a6d96f9fd7
commit
34cbe72780
9 changed files with 73 additions and 81 deletions
|
@ -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,
|
||||
)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue