• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // compile-flags: --crate-type lib
2 #![deny(missing_debug_implementations)]
3 #![allow(unused)]
4 
5 use std::fmt;
6 
7 pub enum A {} //~ ERROR type does not implement `Debug`
8 
9 #[derive(Debug)]
10 pub enum B {}
11 
12 pub enum C {}
13 
14 impl fmt::Debug for C {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result15     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
16         Ok(())
17     }
18 }
19 
20 pub struct Foo; //~ ERROR type does not implement `Debug`
21 
22 #[derive(Debug)]
23 pub struct Bar;
24 
25 pub struct Baz;
26 
27 impl fmt::Debug for Baz {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result28     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
29         Ok(())
30     }
31 }
32 
33 struct PrivateStruct;
34 
35 enum PrivateEnum {}
36 
37 #[derive(Debug)]
38 struct GenericType<T>(T);
39