diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-06 16:54:36 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-04-16 16:29:13 +1000 |
| commit | e93f75428934cce6c14b34fdb44d06affe3f4802 (patch) | |
| tree | 355c094bc21f47b14f27b6bf1e4174c1685075f9 /src/librustdoc/html | |
| parent | 27374a0214a7b057c19af3af85253268095d8db8 (diff) | |
| download | rust-e93f75428934cce6c14b34fdb44d06affe3f4802.tar.gz rust-e93f75428934cce6c14b34fdb44d06affe3f4802.zip | |
Always use `ty::` qualifier for `TyKind` enum variants.
Because that's the way it should be done.
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/type_layout.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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; |
