Skip to content

Missing Debug Implementations #31869

Closed
Closed

Description

The missing_debug_implementations will detect any public type that does not implement Debug. Usually all public types should implement Debug, even if it doesn't share all the internals in its formatting. This allows users to derive(Debug) on their types when they contain a type from std.

I ran the lint against crates that have types exported in std, and I've grouped the results below. I think the eventual goal should be to add #![deny(missing_debug_implementations)] to each crate. Any exceptions should be tagged #[allow(missing_debug_implementations)], though hopefully those should be very few.


collections

  • src/libcollections/binary_heap.rs:672 pub struct Iter<'a, T: 'a>
  • src/libcollections/binary_heap.rs:712 pub struct IntoIter<T>
  • src/libcollections/binary_heap.rs:744 pub struct Drain<'a, T: 'a>
  • src/libcollections/btree/map.rs:188 pub struct Iter<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:195 pub struct IterMut<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:202 pub struct IntoIter<K, V>
  • src/libcollections/btree/map.rs:210 pub struct Keys<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:216 pub struct Values<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:221 pub struct Range<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:227 pub struct RangeMut<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:237 pub enum Entry<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:253 pub struct VacantEntry<'a, K: 'a, V: 'a>
  • src/libcollections/btree/map.rs:264 pub struct OccupiedEntry<'a, K: 'a, V: 'a>
  • src/libcollections/btree/set.rs:49 pub struct Iter<'a, T: 'a>
  • src/libcollections/btree/set.rs:55 pub struct IntoIter<T>
  • src/libcollections/btree/set.rs:60 pub struct Range<'a, T: 'a>
  • src/libcollections/btree/set.rs:66 pub struct Difference<'a, T: 'a>
  • src/libcollections/btree/set.rs:73 pub struct SymmetricDifference<'a, T: 'a>
  • src/libcollections/btree/set.rs:80 pub struct Intersection<'a, T: 'a>
  • src/libcollections/btree/set.rs:87 pub struct Union<'a, T: 'a>
  • src/libcollections/enum_set.rs:218 pub struct Iter<E>
  • src/libcollections/linked_list.rs:59 pub struct Iter<'a, T: 'a>
  • src/libcollections/linked_list.rs:79 pub struct IterMut<'a, T: 'a>
  • src/libcollections/linked_list.rs:89 pub struct IntoIter<T>
  • src/libcollections/linked_list.rs:1052 pub struct FrontPlace<'a, T: 'a>
  • src/libcollections/linked_list.rs:1096 pub struct BackPlace<'a, T: 'a>
  • src/libcollections/str.rs:120 pub struct Utf16Units<'a>
  • src/libcollections/string.rs:1852 pub struct Drain<'a>
  • src/libcollections/vec.rs:1551 pub struct IntoIter<T>
  • src/libcollections/vec.rs:1649 pub struct Drain<'a, T: 'a>
  • src/libcollections/vec_deque.rs:1739 pub struct Iter<'a, T: 'a>
  • src/libcollections/vec_deque.rs:1795 pub struct IterMut<'a, T: 'a>
  • src/libcollections/vec_deque.rs:1848 pub struct IntoIter<T>
  • src/libcollections/vec_deque.rs:1881 pub struct Drain<'a, T: 'a>

rand

  • src/librand/distributions/range.rs:32 pub struct Range<X>
  • src/librand/distributions/gamma.rs:42 pub struct Gamma
  • src/librand/distributions/gamma.rs:180 pub struct ChiSquared
  • src/librand/distributions/gamma.rs:228 pub struct FisherF
  • src/librand/distributions/gamma.rs:263 pub struct StudentT
  • src/librand/distributions/normal.rs:32 pub struct StandardNormal(pub f64);
  • src/librand/distributions/normal.rs:80 pub struct Normal
  • src/librand/distributions/normal.rs:118 pub struct LogNormal
  • src/librand/distributions/exponential.rs:33 pub struct Exp1(pub f64);
  • src/librand/distributions/exponential.rs:62 pub struct Exp
  • src/librand/distributions/mod.rs:57 pub struct RandSample<Sup>
  • src/librand/distributions/mod.rs:80 pub struct Weighted<T>
  • src/librand/distributions/mod.rs:96 pub struct WeightedChoice<'a, T: 'a>
  • src/librand/isaac.rs:38 pub struct IsaacRng
  • src/librand/isaac.rs:316 pub struct Isaac64Rng
  • src/librand/chacha.rs:29 pub struct ChaChaRng
  • src/librand/reseeding.rs:22 pub struct ReseedingRng<R, Rsdr>
  • src/librand/reseeding.rs:107 pub struct ReseedWithDefault;
  • src/librand/lib.rs:282 pub struct Generator<'a, T, R: 'a>
  • src/librand/lib.rs:298 pub struct AsciiGenerator<'a, R: 'a>
  • src/librand/lib.rs:334 pub struct XorShiftRng
  • src/librand/lib.rs:420 pub struct Open01<F>(pub F);
  • src/librand/lib.rs:428 pub struct Closed01<F>(pub F);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions