Tweak collect_non_exhaustive_tys
This commit is contained in:
parent
73a228116a
commit
710add58e2
2 changed files with 23 additions and 17 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue