]> git.lizzy.rs Git - rust.git/blob - tests/ui/missing_debug_impls.rs
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / ui / missing_debug_impls.rs
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 {
15     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 {
28     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);