Rollup merge of #132255 - workingjubilee:layout-is-🏚️, r=compiler-errors
Add `LayoutS::is_uninhabited` and use it Use accessors for the things that accessors are good at: reducing everyone's need to be nosy and peek at the internals of every data structure.
This commit is contained in:
commit
259ddf9b50
21 changed files with 44 additions and 41 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