From 09c0629c46de97b0c9dbdc7e76aafbea8b223873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=B3n=20Orell=20Valerian=20Liehr?= Date: Mon, 8 Jun 2026 12:04:54 +0200 Subject: [PATCH] rustdoc: Remove unnecessary fast path --- src/librustdoc/html/render/mod.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index fd6d389542b99..d78b1eed39987 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -3068,18 +3068,6 @@ fn repr_attribute<'tcx>( return is_public.then(|| "#[repr(transparent)]".into()); } - // Fast path which avoids looking through the variants and fields in - // the common case of no `#[repr]` or in the case of `#[repr(Rust)]`. - // FIXME: This check is not very robust / forward compatible! - if !repr.c() - && !repr.simd() - && repr.int.is_none() - && repr.pack.is_none() - && repr.align.is_none() - { - return None; - } - // The repr is public iff all components are public and visible. let is_public = adt .variants()