rust/library/core
bors a42d5ecf34 Auto merge of #134286 - Urgau:unreach_pub-std, r=ibraheemdev
Enable `unreachable_pub` lint in core

This PR enables the [`unreachable_pub`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub) as warn in `core`, `rtstartup` and `panic_unwind`.

The motivation is similar to the compiler [MCP: Enable deny(unreachable_pub) on `rustc_*` crates](https://github.com/rust-lang/compiler-team/issues/773#issue-2467219005) :

> "Where is this thing used?" is a question I ask all the time when reading unfamiliar code. Because of this, I generally find it annoying when things are marked with a more permissive visibility than necessary. "This thing marked pub, which other crates is it used in? Oh, it's not used in any other crates."

Another motivation is to help to lint by utilizing it in-tree and seeing it's limitation in more complex scenarios.

The diff was mostly generated with `./x.py fix --stage 1 library/core/ -- --broken-code`, as well as manual edits for code in macros, generated code and other targets.

r? libs
2025-01-20 23:34:04 +00:00
..
benches Fix typos 2024-12-27 21:35:57 +08:00
src Auto merge of #134286 - Urgau:unreach_pub-std, r=ibraheemdev 2025-01-20 23:34:04 +00:00
tests Recognise new IPv6 documentation range from RFC9637 2025-01-20 07:39:33 +11:00
Cargo.toml Teach rust core about Xtensa VaListImpl and add a custom lowering of vaarg for xtensa. 2024-12-03 10:54:08 +00:00