Stop using derivative in rustc_pattern_analysis
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user