We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
warn(unreachable_pub)
rustc_mir_build
1 parent d059f4f commit 27b4a1fCopy full SHA for 27b4a1f
compiler/rustc_mir_build/src/check_unsafety.rs
@@ -993,7 +993,7 @@ impl UnsafeOpKind {
993
}
994
995
996
-pub fn check_unsafety(tcx: TyCtxt<'_>, def: LocalDefId) {
+pub(crate) fn check_unsafety(tcx: TyCtxt<'_>, def: LocalDefId) {
997
// Closures and inline consts are handled by their owner, if it has a body
998
// Also, don't safety check custom MIR
999
if tcx.is_typeck_child(def.to_def_id()) || tcx.has_attr(def, sym::custom_mir) {
compiler/rustc_mir_build/src/lib.rs
@@ -8,6 +8,7 @@
8
#![feature(if_let_guard)]
9
#![feature(let_chains)]
10
#![feature(try_blocks)]
11
+#![warn(unreachable_pub)]
12
// tidy-alphabetical-end
13
14
mod build;
0 commit comments