1 #![warn(clippy::missing_panics_doc)]
2 #![allow(clippy::option_map_unit_fn)]
5 /// This needs to be documented
7 let result = Err("Hi");
11 /// This needs to be documented
13 panic!("This function panics")
16 /// This needs to be documented
21 /// This needs to be documented
22 pub fn inner_body(opt: Option<u32>) {
30 /// This needs to be documented
31 pub fn unreachable_and_panic() {
32 if true { unreachable!() } else { panic!() }
35 /// This needs to be documented
41 /// This needs to be documented
47 /// This is documented
51 /// Panics if `result` if an error
52 pub fn unwrap_documented() {
53 let result = Err("Hi");
57 /// This is documented
61 /// Panics just because
62 pub fn panic_documented() {
63 panic!("This function panics")
66 /// This is documented
70 /// Panics if `opt` is Just(10)
71 pub fn inner_body_documented(opt: Option<u32>) {
79 /// This is documented
83 /// We still need to do this part
84 pub fn todo_documented() {
88 /// This is documented
92 /// We still need to do this part
93 pub fn unreachable_amd_panic_documented() {
94 if true { unreachable!() } else { panic!() }
97 /// This is documented
101 /// Panics if `x` is not 0.
102 pub fn assert_eq_documented() {
107 /// This is documented
111 /// Panics if `x` is 0.
112 pub fn assert_ne_documented() {
117 /// This is okay because it is private
118 fn unwrap_private() {
119 let result = Err("Hi");
123 /// This is okay because it is private
125 panic!("This function panics")
128 /// This is okay because it is private
133 /// This is okay because it is private
134 fn inner_body_private(opt: Option<u32>) {
142 /// This is okay because unreachable
143 pub fn unreachable() {
144 unreachable!("This function panics")
148 /// This is okay because it is expansion of `debug_assert` family.
149 pub fn debug_assertions() {
150 debug_assert!(false);
151 debug_assert_eq!(1, 2);
152 debug_assert_ne!(1, 2);