diff options
| author | bors <bors@rust-lang.org> | 2024-07-22 03:31:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-22 03:31:16 +0000 |
| commit | ee0fd6caf770e8b3baa403b4da3ef0c7e274dc21 (patch) | |
| tree | 51ba530f78f3619f36a9fc858102ef074270302b /compiler/rustc_pattern_analysis/src | |
| parent | 0f8534e79e4cfbda7421017047d1f5021235b0ac (diff) | |
| parent | fdef1d959202b3269430fff1ac0b5e9dde746b3d (diff) | |
| download | rust-ee0fd6caf770e8b3baa403b4da3ef0c7e274dc21.tar.gz rust-ee0fd6caf770e8b3baa403b4da3ef0c7e274dc21.zip | |
Auto merge of #128048 - workingjubilee:rollup-gehtjxd, r=workingjubilee
Rollup of 6 pull requests Successful merges: - #127583 (Deal with invalid UTF-8 from `gai_strerror`) - #128014 (Fix stab display in doc blocks) - #128020 (Just totally fully deny late-bound consts) - #128023 (rustdoc: short descriptions cause word-breaks in tables) - #128033 (Explain why we require `_` for empty patterns) - #128038 (Don't output incremental test artifacts into working directory) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/rustc.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs index d17ee8bff50..6ef2d69273e 100644 --- a/compiler/rustc_pattern_analysis/src/rustc.rs +++ b/compiler/rustc_pattern_analysis/src/rustc.rs @@ -40,9 +40,15 @@ pub type WitnessPat<'p, 'tcx> = crate::pat::WitnessPat<RustcPatCtxt<'p, 'tcx>>; /// /// Use `.inner()` or deref to get to the `Ty<'tcx>`. #[repr(transparent)] -#[derive(Clone, Copy)] +#[derive(Clone, Copy, PartialEq, Eq, Hash)] pub struct RevealedTy<'tcx>(Ty<'tcx>); +impl<'tcx> fmt::Display for RevealedTy<'tcx> { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { + self.0.fmt(fmt) + } +} + impl<'tcx> fmt::Debug for RevealedTy<'tcx> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { self.0.fmt(fmt) |
