1
Fork 0
rust/compiler/rustc_ast/src
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
..
attr Reformat use declarations. 2024-07-29 08:26:52 +10:00
expand Reformat use declarations. 2024-07-29 08:26:52 +10:00
util Reformat use declarations. 2024-07-29 08:26:52 +10:00
ast.rs Rollup merge of #128524 - chenyukang:yukang-fix-127930-invalid-outer-style-sugg, r=cjgillot 2024-08-24 21:03:31 -05:00
ast_traits.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
entry.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
format.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lib.rs Add warn(unreachable_pub) to several crates. 2024-08-16 08:46:13 +10:00
mut_visit.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
node_id.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ptr.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
token.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tokenstream.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
visit.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00