compiler: Add is_uninhabited
and use LayoutS accessors
This reduces the need of the compiler to peek on the fields of LayoutS.
This commit is contained in:
parent
5f5c243ca0
commit
88a9edc091
20 changed files with 40 additions and 37 deletions
|
@ -172,7 +172,7 @@ fn check_static_inhabited(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
|||
return;
|
||||
}
|
||||
};
|
||||
if layout.abi.is_uninhabited() {
|
||||
if layout.is_uninhabited() {
|
||||
tcx.node_span_lint(
|
||||
UNINHABITED_STATIC,
|
||||
tcx.local_def_id_to_hir_id(def_id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue