Skip to content

Commit

Permalink
remove Canonical::unchecked_rebind, it's unused
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Oct 15, 2024
1 parent e457466 commit a5e280e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions compiler/rustc_type_ir/src/canonical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit a5e280e

Please sign in to comment.