about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-20 23:34:04 +0000
committerbors <bors@rust-lang.org>2025-01-20 23:34:04 +0000
commita42d5ecf34c1d4ec8f7e35059b647b576cb42d93 (patch)
treeb1a5c9eb6e2a342bbd547799700e92717175bf03 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentf3d1d47fd84dfcf7f513be1dbad356e74c8f3b2b (diff)
parent15f345b8152f35c3bb1b665cf391f81d3323b9e9 (diff)
downloadrust-a42d5ecf34c1d4ec8f7e35059b647b576cb42d93.tar.gz
rust-a42d5ecf34c1d4ec8f7e35059b647b576cb42d93.zip
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
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions