|
| 1 | +error: docs for function which may panic missing `# Panics` section |
| 2 | + --> $DIR/missing_panics_doc.rs:3:1 |
| 3 | + | |
| 4 | +LL | pub fn option_unwrap<T>(v: &[T]) -> &T { |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: first possible panic found here |
| 8 | + --> $DIR/missing_panics_doc.rs:5:5 |
| 9 | + | |
| 10 | +LL | o.unwrap() |
| 11 | + | ^^^^^^^^^^ |
| 12 | + = note: `-D clippy::missing-panics-doc` implied by `-D warnings` |
| 13 | + |
| 14 | +error: docs for function which may panic missing `# Panics` section |
| 15 | + --> $DIR/missing_panics_doc.rs:8:1 |
| 16 | + | |
| 17 | +LL | pub fn option_expect<T>(v: &[T]) -> &T { |
| 18 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 19 | + | |
| 20 | +note: first possible panic found here |
| 21 | + --> $DIR/missing_panics_doc.rs:10:5 |
| 22 | + | |
| 23 | +LL | o.expect("passed an empty thing") |
| 24 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 25 | + |
| 26 | +error: docs for function which may panic missing `# Panics` section |
| 27 | + --> $DIR/missing_panics_doc.rs:13:1 |
| 28 | + | |
| 29 | +LL | pub fn result_unwrap<T>(v: &[T]) -> &T { |
| 30 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 31 | + | |
| 32 | +note: first possible panic found here |
| 33 | + --> $DIR/missing_panics_doc.rs:15:5 |
| 34 | + | |
| 35 | +LL | res.unwrap() |
| 36 | + | ^^^^^^^^^^^^ |
| 37 | + |
| 38 | +error: docs for function which may panic missing `# Panics` section |
| 39 | + --> $DIR/missing_panics_doc.rs:18:1 |
| 40 | + | |
| 41 | +LL | pub fn result_expect<T>(v: &[T]) -> &T { |
| 42 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 43 | + | |
| 44 | +note: first possible panic found here |
| 45 | + --> $DIR/missing_panics_doc.rs:20:5 |
| 46 | + | |
| 47 | +LL | res.expect("passed an empty thing") |
| 48 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 49 | + |
| 50 | +error: docs for function which may panic missing `# Panics` section |
| 51 | + --> $DIR/missing_panics_doc.rs:23:1 |
| 52 | + | |
| 53 | +LL | pub fn last_unwrap(v: &[u32]) -> u32 { |
| 54 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 55 | + | |
| 56 | +note: first possible panic found here |
| 57 | + --> $DIR/missing_panics_doc.rs:24:6 |
| 58 | + | |
| 59 | +LL | *v.last().unwrap() |
| 60 | + | ^^^^^^^^^^^^^^^^^ |
| 61 | + |
| 62 | +error: docs for function which may panic missing `# Panics` section |
| 63 | + --> $DIR/missing_panics_doc.rs:27:1 |
| 64 | + | |
| 65 | +LL | pub fn last_expect(v: &[u32]) -> u32 { |
| 66 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 67 | + | |
| 68 | +note: first possible panic found here |
| 69 | + --> $DIR/missing_panics_doc.rs:28:6 |
| 70 | + | |
| 71 | +LL | *v.last().expect("passed an empty thing") |
| 72 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 73 | + |
| 74 | +error: aborting due to 6 previous errors |
| 75 | + |
0 commit comments