1
Fork 0
rust/compiler/rustc_codegen_ssa/src/back
Matthias Krüger 110c3df7fd
Rollup merge of #126013 - nnethercote:unreachable_pub, r=Urgau
Add `#[warn(unreachable_pub)]` to a bunch of compiler crates

By default `unreachable_pub` identifies things that need not be `pub` and tells you to make them `pub(crate)`. But sometimes those things don't need any kind of visibility. So they way I did these was to remove the visibility entirely for each thing the lint identifies, and then add `pub(crate)` back in everywhere the compiler said it was necessary. (Or occasionally `pub(super)` when context suggested that was appropriate.) Tedious, but results in more `pub` removal.

There are plenty more crates to do but this seems like enough for a first PR.

r? `@compiler-errors`
2024-08-27 00:41:57 +02:00
..
rpath Reformat use declarations. 2024-07-29 08:26:52 +10:00
archive.rs Fix elided_named_lifetimes in code 2024-08-24 19:21:32 +03:00
command.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
link.rs Add warn(unreachable_pub) to rustc_codegen_ssa. 2024-08-16 08:46:57 +10:00
linker.rs Simplify some redundant field names 2024-08-21 01:31:42 -04:00
lto.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
metadata.rs rustc_codegen_ssa: Set architecture for object crate for 32-bit SPARC 2024-08-07 09:56:28 +02:00
mod.rs Use the object crate for metadata reading 2021-05-07 18:48:58 +02:00
rpath.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
symbol_export.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
write.rs Add warn(unreachable_pub) to rustc_codegen_ssa. 2024-08-16 08:46:57 +10:00