diff options
| author | varkor <github@varkor.com> | 2020-01-23 00:41:33 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2020-02-22 00:28:49 +0000 |
| commit | dff64eb4b6b6a1cd2ae4e122b70a632f52f1dada (patch) | |
| tree | 563b80aa740512086361c1840c6de702502dc0c5 /src/librustc | |
| parent | c9b7b1f73b8d256a0885506d8e7e76cd35067318 (diff) | |
Make return value of `check_generic_arg_count` semantically clearer
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/ty/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/structural_impls.rs | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 54c0a267fe7..7df1383f86a 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -941,7 +941,7 @@ impl GenericParamDefKind { } } -#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)] +#[derive(Clone, Debug, RustcEncodable, RustcDecodable, HashStable)] pub struct GenericParamDef { pub name: Symbol, pub def_id: DefId, diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index 388afc15c85..03ff1b8a317 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -17,12 +17,6 @@ use std::fmt; use std::rc::Rc; use std::sync::Arc; -impl fmt::Debug for ty::GenericParamDef { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}({}, {:?}, {})", self.kind.descr(), self.name, self.def_id, self.index) - } -} - impl fmt::Debug for ty::TraitDef { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { ty::tls::with(|tcx| { |
