about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2024-10-15 18:24:05 +0200
committerlcnr <rust@lcnr.de>2024-10-17 09:53:27 +0200
commit5834ba1ab794104b3bd2769748183f1ec04a76e2 (patch)
tree18f321de5a098872fbb2ea50018c6d658bd19920
parentf3ce557fcd9f29893f1d00526edc5dd15c0088eb (diff)
remove Canonical::unchecked_rebind, it's unused
-rw-r--r--compiler/rustc_type_ir/src/canonical.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/rustc_type_ir/src/canonical.rs b/compiler/rustc_type_ir/src/canonical.rs
index d609e5add14..351179df9d7 100644
--- a/compiler/rustc_type_ir/src/canonical.rs
+++ b/compiler/rustc_type_ir/src/canonical.rs
@@ -57,16 +57,6 @@ impl<I: Interner, V> Canonical<I, V> {
         let Canonical { defining_opaque_types, max_universe, variables, value } = self;
         Canonical { defining_opaque_types, max_universe, variables, value: map_op(value) }
     }
-
-    /// Allows you to map the `value` of a canonical while keeping the same set of
-    /// bound variables.
-    ///
-    /// **WARNING:** This function is very easy to mis-use, hence the name! See
-    /// the comment of [Canonical::unchecked_map] for more details.
-    pub fn unchecked_rebind<W>(self, value: W) -> Canonical<I, W> {
-        let Canonical { defining_opaque_types, max_universe, variables, value: _ } = self;
-        Canonical { defining_opaque_types, max_universe, variables, value }
-    }
 }
 
 impl<I: Interner, V: fmt::Display> fmt::Display for Canonical<I, V> {