about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-08-30 16:30:18 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-09-03 08:50:31 +1000
commit3e09c450b418c7cf6d2ad54d989aa36bb20d9e80 (patch)
tree19c2f25ff37a220013a73e468de44b4d9486dae4
parente4b1e2803378e1f4eb6eff0d5042e15239fae6e2 (diff)
Add `warn(unreachable_pub)` to `rustc_type_ir`.
-rw-r--r--compiler/rustc_type_ir/src/fold.rs2
-rw-r--r--compiler/rustc_type_ir/src/lib.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_type_ir/src/fold.rs b/compiler/rustc_type_ir/src/fold.rs
index 8e3534b0e9e..f49aa3431b5 100644
--- a/compiler/rustc_type_ir/src/fold.rs
+++ b/compiler/rustc_type_ir/src/fold.rs
@@ -354,7 +354,7 @@ struct Shifter<I: Interner> {
 }
 
 impl<I: Interner> Shifter<I> {
-    pub fn new(cx: I, amount: u32) -> Self {
+    fn new(cx: I, amount: u32) -> Self {
         Shifter { cx, current_index: ty::INNERMOST, amount }
     }
 }
diff --git a/compiler/rustc_type_ir/src/lib.rs b/compiler/rustc_type_ir/src/lib.rs
index f763153a5fc..be261b348de 100644
--- a/compiler/rustc_type_ir/src/lib.rs
+++ b/compiler/rustc_type_ir/src/lib.rs
@@ -6,6 +6,7 @@
 )]
 #![cfg_attr(feature = "nightly", allow(internal_features))]
 #![cfg_attr(not(bootstrap), allow(rustc::usage_of_type_ir_inherent))]
+#![warn(unreachable_pub)]
 // tidy-alphabetical-end
 
 extern crate self as rustc_type_ir;