From e93f75428934cce6c14b34fdb44d06affe3f4802 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 6 Mar 2024 16:54:36 +1100 Subject: Always use `ty::` qualifier for `TyKind` enum variants. Because that's the way it should be done. --- src/librustdoc/html/render/type_layout.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/librustdoc/html/render') diff --git a/src/librustdoc/html/render/type_layout.rs b/src/librustdoc/html/render/type_layout.rs index 738ea0aee7e..a27e327f235 100644 --- a/src/librustdoc/html/render/type_layout.rs +++ b/src/librustdoc/html/render/type_layout.rs @@ -3,8 +3,7 @@ use askama::Template; use rustc_data_structures::captures::Captures; use rustc_hir::def_id::DefId; use rustc_middle::span_bug; -use rustc_middle::ty::layout::LayoutError; -use rustc_middle::ty::Adt; +use rustc_middle::ty::{self, layout::LayoutError}; use rustc_span::symbol::Symbol; use rustc_target::abi::{Primitive, TagEncoding, Variants}; @@ -57,7 +56,7 @@ pub(crate) fn document_type_layout<'a, 'cx: 'a>( variants .iter_enumerated() .map(|(variant_idx, variant_layout)| { - let Adt(adt, _) = type_layout.ty.kind() else { + let ty::Adt(adt, _) = type_layout.ty.kind() else { span_bug!(tcx.def_span(ty_def_id), "not an adt") }; let name = adt.variant(variant_idx).name; -- cgit 1.4.1-3-g733a5