diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-01-27 14:18:33 +0200 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-01-27 14:21:01 +0200 |
| commit | f5c78955c88ac37b7422bef6ee9ec993c0a5dad2 (patch) | |
| tree | 0e2612a47f528890d719a6f6d698d67b1e2a1412 /compiler/rustc_pattern_analysis/src/rustc.rs | |
| parent | 8b6a431b3d3066a54dffc7f16bf658cf5690efc9 (diff) | |
| download | rust-f5c78955c88ac37b7422bef6ee9ec993c0a5dad2.tar.gz rust-f5c78955c88ac37b7422bef6ee9ec993c0a5dad2.zip | |
Stop using derivative in rustc_pattern_analysis
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/rustc.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/rustc.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs index ef90d24b0bf..223d6cefc83 100644 --- a/compiler/rustc_pattern_analysis/src/rustc.rs +++ b/compiler/rustc_pattern_analysis/src/rustc.rs @@ -46,11 +46,15 @@ pub type WitnessPat<'p, 'tcx> = crate::pat::WitnessPat<RustcMatchCheckCtxt<'p, ' /// /// Use `.inner()` or deref to get to the `Ty<'tcx>`. #[repr(transparent)] -#[derive(derivative::Derivative)] #[derive(Clone, Copy)] -#[derivative(Debug = "transparent")] pub struct RevealedTy<'tcx>(Ty<'tcx>); +impl<'tcx> fmt::Debug for RevealedTy<'tcx> { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { + self.0.fmt(fmt) + } +} + impl<'tcx> std::ops::Deref for RevealedTy<'tcx> { type Target = Ty<'tcx>; fn deref(&self) -> &Self::Target { |
