From 65d7e6937b71a76044575f0f727a4903c1574805 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Thu, 6 Feb 2025 12:04:42 +1100 Subject: [PATCH 1/2] Remove the `mod llvm_` hack, which should no longer be necessary --- compiler/rustc_codegen_llvm/src/lib.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index 4a84fd29e4475..14346795fda62 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -71,14 +71,9 @@ mod debuginfo; mod declare; mod errors; mod intrinsic; - -// The following is a workaround that replaces `pub mod llvm;` and that fixes issue 53912. -#[path = "llvm/mod.rs"] -mod llvm_; -pub mod llvm { - pub use super::llvm_::*; -} - +// FIXME(Zalathar): Fix all the unreachable-pub warnings that would occur if +// this isn't pub, then make it not pub. +pub mod llvm; mod llvm_util; mod mono_item; mod type_; From 042fd8c24a5e52faae9b517e3447c707b58d0cd9 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Thu, 6 Feb 2025 12:09:49 +1100 Subject: [PATCH 2/2] Remove some unused glob re-exports These were detected by temporarily making `mod llvm` non-public. --- compiler/rustc_codegen_llvm/src/llvm/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/compiler/rustc_codegen_llvm/src/llvm/mod.rs b/compiler/rustc_codegen_llvm/src/llvm/mod.rs index 2592a7df95c29..707aeba22ccf7 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/mod.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/mod.rs @@ -10,13 +10,9 @@ use libc::c_uint; use rustc_abi::{Align, Size, WrappingRange}; use rustc_llvm::RustString; -pub use self::AtomicRmwBinOp::*; pub use self::CallConv::*; pub use self::CodeGenOptSize::*; -pub use self::IntPredicate::*; -pub use self::Linkage::*; pub use self::MetadataType::*; -pub use self::RealPredicate::*; pub use self::ffi::*; use crate::common::AsCCharPtr;