1 error: docs for function which may panic missing `# Panics` section
2 --> $DIR/missing_panics_doc.rs:13:1
7 note: first possible panic found here
8 --> $DIR/missing_panics_doc.rs:15:5
12 = note: `-D clippy::missing-panics-doc` implied by `-D warnings`
13 = help: to override `-D warnings` add `#[allow(clippy::missing_panics_doc)]`
15 error: docs for function which may panic missing `# Panics` section
16 --> $DIR/missing_panics_doc.rs:19:1
21 note: first possible panic found here
22 --> $DIR/missing_panics_doc.rs:20:5
24 LL | panic!("This function panics")
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 error: docs for function which may panic missing `# Panics` section
28 --> $DIR/missing_panics_doc.rs:24:1
30 LL | pub fn inner_body(opt: Option<u32>) {
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33 note: first possible panic found here
34 --> $DIR/missing_panics_doc.rs:27:13
39 error: docs for function which may panic missing `# Panics` section
40 --> $DIR/missing_panics_doc.rs:33:1
42 LL | pub fn unreachable_and_panic() {
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 note: first possible panic found here
46 --> $DIR/missing_panics_doc.rs:34:39
48 LL | if true { unreachable!() } else { panic!() }
51 error: docs for function which may panic missing `# Panics` section
52 --> $DIR/missing_panics_doc.rs:38:1
54 LL | pub fn assert_eq() {
57 note: first possible panic found here
58 --> $DIR/missing_panics_doc.rs:40:5
60 LL | assert_eq!(x, 0);
63 error: docs for function which may panic missing `# Panics` section
64 --> $DIR/missing_panics_doc.rs:44:1
66 LL | pub fn assert_ne() {
69 note: first possible panic found here
70 --> $DIR/missing_panics_doc.rs:46:5
72 LL | assert_ne!(x, 0);
75 error: docs for function which may panic missing `# Panics` section
76 --> $DIR/missing_panics_doc.rs:151:5
78 LL | pub fn option_unwrap<T>(v: &[T]) -> &T {
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 note: first possible panic found here
82 --> $DIR/missing_panics_doc.rs:153:9
87 error: docs for function which may panic missing `# Panics` section
88 --> $DIR/missing_panics_doc.rs:156:5
90 LL | pub fn option_expect<T>(v: &[T]) -> &T {
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93 note: first possible panic found here
94 --> $DIR/missing_panics_doc.rs:158:9
96 LL | o.expect("passed an empty thing")
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99 error: docs for function which may panic missing `# Panics` section
100 --> $DIR/missing_panics_doc.rs:161:5
102 LL | pub fn result_unwrap<T>(v: &[T]) -> &T {
103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105 note: first possible panic found here
106 --> $DIR/missing_panics_doc.rs:163:9
111 error: docs for function which may panic missing `# Panics` section
112 --> $DIR/missing_panics_doc.rs:166:5
114 LL | pub fn result_expect<T>(v: &[T]) -> &T {
115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117 note: first possible panic found here
118 --> $DIR/missing_panics_doc.rs:168:9
120 LL | res.expect("passed an empty thing")
121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123 error: docs for function which may panic missing `# Panics` section
124 --> $DIR/missing_panics_doc.rs:171:5
126 LL | pub fn last_unwrap(v: &[u32]) -> u32 {
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129 note: first possible panic found here
130 --> $DIR/missing_panics_doc.rs:172:10
132 LL | *v.last().unwrap()
135 error: docs for function which may panic missing `# Panics` section
136 --> $DIR/missing_panics_doc.rs:175:5
138 LL | pub fn last_expect(v: &[u32]) -> u32 {
139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141 note: first possible panic found here
142 --> $DIR/missing_panics_doc.rs:176:10
144 LL | *v.last().expect("passed an empty thing")
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147 error: aborting due to 12 previous errors