1 #![warn(clippy::missing_panics_doc)]
2 #![allow(clippy::option_map_unit_fn)]
6 /// This needs to be documented
8 let result = Err("Hi");
12 /// This needs to be documented
14 panic!("This function panics")
17 /// This needs to be documented
22 /// This needs to be documented
23 pub fn inner_body(opt: Option<u32>) {
31 /// This needs to be documented
32 pub fn unreachable_and_panic() {
33 if true { unreachable!() } else { panic!() }
36 /// This needs to be documented
42 /// This needs to be documented
48 /// This is documented
52 /// Panics if `result` if an error
53 pub fn unwrap_documented() {
54 let result = Err("Hi");
58 /// This is documented
62 /// Panics just because
63 pub fn panic_documented() {
64 panic!("This function panics")
67 /// This is documented
71 /// Panics if `opt` is Just(10)
72 pub fn inner_body_documented(opt: Option<u32>) {
80 /// This is documented
84 /// We still need to do this part
85 pub fn todo_documented() {
89 /// This is documented
93 /// We still need to do this part
94 pub fn unreachable_amd_panic_documented() {
95 if true { unreachable!() } else { panic!() }
98 /// This is documented
102 /// Panics if `x` is not 0.
103 pub fn assert_eq_documented() {
108 /// This is documented
112 /// Panics if `x` is 0.
113 pub fn assert_ne_documented() {
118 /// This is okay because it is private
119 fn unwrap_private() {
120 let result = Err("Hi");
124 /// This is okay because it is private
126 panic!("This function panics")
129 /// This is okay because it is private
134 /// This is okay because it is private
135 fn inner_body_private(opt: Option<u32>) {
143 /// This is okay because unreachable
144 pub fn unreachable() {
145 unreachable!("This function panics")
149 /// This is okay because it is expansion of `debug_assert` family.
150 pub fn debug_assertions() {
151 debug_assert!(false);
152 debug_assert_eq!(1, 2);
153 debug_assert_ne!(1, 2);