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 938daf6 commit c16e289Copy full SHA for c16e289
compiler/rustc_mir_build/src/check_unsafety.rs
@@ -1027,7 +1027,7 @@ impl UnsafeOpKind {
1027
}
1028
1029
1030
-pub fn check_unsafety(tcx: TyCtxt<'_>, def: LocalDefId) {
+pub(crate) fn check_unsafety(tcx: TyCtxt<'_>, def: LocalDefId) {
1031
// Closures and inline consts are handled by their owner, if it has a body
1032
// Also, don't safety check custom MIR
1033
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