From 641ce068ae6f26eee5b455cf0110ba2ed370d384 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sun, 27 Oct 2024 21:36:52 -0700 Subject: [PATCH] rustdoc: Use accessors to interrogate type layouts --- src/librustdoc/html/render/type_layout.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/render/type_layout.rs b/src/librustdoc/html/render/type_layout.rs index cd4e597ff28..79209cee94f 100644 --- a/src/librustdoc/html/render/type_layout.rs +++ b/src/librustdoc/html/render/type_layout.rs @@ -60,8 +60,8 @@ pub(crate) fn document_type_layout<'a, 'cx: 'a>( span_bug!(tcx.def_span(ty_def_id), "not an adt") }; let name = adt.variant(variant_idx).name; - let is_unsized = variant_layout.abi.is_unsized(); - let is_uninhabited = variant_layout.abi.is_uninhabited(); + let is_unsized = variant_layout.is_unsized(); + let is_uninhabited = variant_layout.is_uninhabited(); let size = variant_layout.size.bytes() - tag_size; let type_layout_size = TypeLayoutSize { is_unsized, is_uninhabited, size }; (name, type_layout_size) @@ -72,8 +72,8 @@ pub(crate) fn document_type_layout<'a, 'cx: 'a>( }; let type_layout_size = tcx.layout_of(param_env.and(ty)).map(|layout| { - let is_unsized = layout.abi.is_unsized(); - let is_uninhabited = layout.abi.is_uninhabited(); + let is_unsized = layout.is_unsized(); + let is_uninhabited = layout.is_uninhabited(); let size = layout.size.bytes(); TypeLayoutSize { is_unsized, is_uninhabited, size } });