]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: docs for function which may panic missing `# Panics` section |
3c0e092e | 2 | --> $DIR/missing_panics_doc.rs:6:1 |
f20569fa XL |
3 | | |
4 | LL | / pub fn unwrap() { | |
5 | LL | | let result = Err("Hi"); | |
6 | LL | | result.unwrap() | |
7 | LL | | } | |
8 | | |_^ | |
9 | | | |
f20569fa | 10 | note: first possible panic found here |
3c0e092e | 11 | --> $DIR/missing_panics_doc.rs:8:5 |
f20569fa XL |
12 | | |
13 | LL | result.unwrap() | |
14 | | ^^^^^^^^^^^^^^^ | |
2b03887a | 15 | = note: `-D clippy::missing-panics-doc` implied by `-D warnings` |
f20569fa XL |
16 | |
17 | error: docs for function which may panic missing `# Panics` section | |
3c0e092e | 18 | --> $DIR/missing_panics_doc.rs:12:1 |
f20569fa XL |
19 | | |
20 | LL | / pub fn panic() { | |
21 | LL | | panic!("This function panics") | |
22 | LL | | } | |
23 | | |_^ | |
24 | | | |
25 | note: first possible panic found here | |
3c0e092e | 26 | --> $DIR/missing_panics_doc.rs:13:5 |
f20569fa XL |
27 | | |
28 | LL | panic!("This function panics") | |
29 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
f20569fa XL |
30 | |
31 | error: docs for function which may panic missing `# Panics` section | |
3c0e092e | 32 | --> $DIR/missing_panics_doc.rs:17:1 |
f20569fa XL |
33 | | |
34 | LL | / pub fn todo() { | |
35 | LL | | todo!() | |
36 | LL | | } | |
37 | | |_^ | |
38 | | | |
39 | note: first possible panic found here | |
3c0e092e | 40 | --> $DIR/missing_panics_doc.rs:18:5 |
f20569fa XL |
41 | | |
42 | LL | todo!() | |
43 | | ^^^^^^^ | |
f20569fa XL |
44 | |
45 | error: docs for function which may panic missing `# Panics` section | |
3c0e092e | 46 | --> $DIR/missing_panics_doc.rs:22:1 |
f20569fa XL |
47 | | |
48 | LL | / pub fn inner_body(opt: Option<u32>) { | |
49 | LL | | opt.map(|x| { | |
50 | LL | | if x == 10 { | |
51 | LL | | panic!() | |
52 | LL | | } | |
53 | LL | | }); | |
54 | LL | | } | |
55 | | |_^ | |
56 | | | |
57 | note: first possible panic found here | |
3c0e092e | 58 | --> $DIR/missing_panics_doc.rs:25:13 |
f20569fa XL |
59 | | |
60 | LL | panic!() | |
61 | | ^^^^^^^^ | |
f20569fa XL |
62 | |
63 | error: docs for function which may panic missing `# Panics` section | |
3c0e092e | 64 | --> $DIR/missing_panics_doc.rs:31:1 |
f20569fa XL |
65 | | |
66 | LL | / pub fn unreachable_and_panic() { | |
67 | LL | | if true { unreachable!() } else { panic!() } | |
68 | LL | | } | |
69 | | |_^ | |
70 | | | |
71 | note: first possible panic found here | |
3c0e092e | 72 | --> $DIR/missing_panics_doc.rs:32:39 |
f20569fa XL |
73 | | |
74 | LL | if true { unreachable!() } else { panic!() } | |
75 | | ^^^^^^^^ | |
f20569fa | 76 | |
cdc7bbd5 | 77 | error: docs for function which may panic missing `# Panics` section |
3c0e092e | 78 | --> $DIR/missing_panics_doc.rs:36:1 |
cdc7bbd5 XL |
79 | | |
80 | LL | / pub fn assert_eq() { | |
81 | LL | | let x = 0; | |
82 | LL | | assert_eq!(x, 0); | |
83 | LL | | } | |
84 | | |_^ | |
85 | | | |
86 | note: first possible panic found here | |
3c0e092e | 87 | --> $DIR/missing_panics_doc.rs:38:5 |
cdc7bbd5 XL |
88 | | |
89 | LL | assert_eq!(x, 0); | |
c295e0f8 | 90 | | ^^^^^^^^^^^^^^^^ |
cdc7bbd5 XL |
91 | |
92 | error: docs for function which may panic missing `# Panics` section | |
3c0e092e | 93 | --> $DIR/missing_panics_doc.rs:42:1 |
cdc7bbd5 XL |
94 | | |
95 | LL | / pub fn assert_ne() { | |
96 | LL | | let x = 0; | |
97 | LL | | assert_ne!(x, 0); | |
98 | LL | | } | |
99 | | |_^ | |
100 | | | |
101 | note: first possible panic found here | |
3c0e092e | 102 | --> $DIR/missing_panics_doc.rs:44:5 |
cdc7bbd5 XL |
103 | | |
104 | LL | assert_ne!(x, 0); | |
c295e0f8 | 105 | | ^^^^^^^^^^^^^^^^ |
cdc7bbd5 XL |
106 | |
107 | error: aborting due to 7 previous errors | |
f20569fa | 108 |