Rollup merge of #120516 - Nadrieril:cleanup-impls, r=compiler-errors
pattern_analysis: cleanup manual impls https://github.com/rust-lang/rust/pull/120420 introduced some unneeded manual impls. I remove them here. r? ```@Nilstrieb```
This commit is contained in:
@@ -297,6 +297,7 @@ impl<'p, Cx: TypeCx> fmt::Debug for PatOrWild<'p, Cx> {
|
||||
|
||||
/// Same idea as `DeconstructedPat`, except this is a fictitious pattern built up for diagnostics
|
||||
/// purposes. As such they don't use interning and can be cloned.
|
||||
#[derive(Debug)]
|
||||
pub struct WitnessPat<Cx: TypeCx> {
|
||||
ctor: Constructor<Cx>,
|
||||
pub(crate) fields: Vec<WitnessPat<Cx>>,
|
||||
@@ -309,16 +310,6 @@ impl<Cx: TypeCx> Clone for WitnessPat<Cx> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Cx: TypeCx> fmt::Debug for WitnessPat<Cx> {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt.debug_struct("WitnessPat")
|
||||
.field("ctor", &self.ctor)
|
||||
.field("fields", &self.fields)
|
||||
.field("ty", &self.ty)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<Cx: TypeCx> WitnessPat<Cx> {
|
||||
pub(crate) fn new(ctor: Constructor<Cx>, fields: Vec<Self>, ty: Cx::Ty) -> Self {
|
||||
Self { ctor, fields, ty }
|
||||
|
||||
Reference in New Issue
Block a user