]> git.lizzy.rs Git - rust.git/blob - tests/ui/missing_panics_doc.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / missing_panics_doc.stderr
1 error: docs for function which may panic missing `# Panics` section
2   --> $DIR/missing_panics_doc.rs:6:1
3    |
4 LL | / pub fn unwrap() {
5 LL | |     let result = Err("Hi");
6 LL | |     result.unwrap()
7 LL | | }
8    | |_^
9    |
10 note: first possible panic found here
11   --> $DIR/missing_panics_doc.rs:8:5
12    |
13 LL |     result.unwrap()
14    |     ^^^^^^^^^^^^^^^
15    = note: `-D clippy::missing-panics-doc` implied by `-D warnings`
16
17 error: docs for function which may panic missing `# Panics` section
18   --> $DIR/missing_panics_doc.rs:12:1
19    |
20 LL | / pub fn panic() {
21 LL | |     panic!("This function panics")
22 LL | | }
23    | |_^
24    |
25 note: first possible panic found here
26   --> $DIR/missing_panics_doc.rs:13:5
27    |
28 LL |     panic!("This function panics")
29    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30
31 error: docs for function which may panic missing `# Panics` section
32   --> $DIR/missing_panics_doc.rs:17:1
33    |
34 LL | / pub fn todo() {
35 LL | |     todo!()
36 LL | | }
37    | |_^
38    |
39 note: first possible panic found here
40   --> $DIR/missing_panics_doc.rs:18:5
41    |
42 LL |     todo!()
43    |     ^^^^^^^
44
45 error: docs for function which may panic missing `# Panics` section
46   --> $DIR/missing_panics_doc.rs:22:1
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
58   --> $DIR/missing_panics_doc.rs:25:13
59    |
60 LL |             panic!()
61    |             ^^^^^^^^
62
63 error: docs for function which may panic missing `# Panics` section
64   --> $DIR/missing_panics_doc.rs:31:1
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
72   --> $DIR/missing_panics_doc.rs:32:39
73    |
74 LL |     if true { unreachable!() } else { panic!() }
75    |                                       ^^^^^^^^
76
77 error: docs for function which may panic missing `# Panics` section
78   --> $DIR/missing_panics_doc.rs:36:1
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
87   --> $DIR/missing_panics_doc.rs:38:5
88    |
89 LL |     assert_eq!(x, 0);
90    |     ^^^^^^^^^^^^^^^^
91
92 error: docs for function which may panic missing `# Panics` section
93   --> $DIR/missing_panics_doc.rs:42:1
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
102   --> $DIR/missing_panics_doc.rs:44:5
103    |
104 LL |     assert_ne!(x, 0);
105    |     ^^^^^^^^^^^^^^^^
106
107 error: aborting due to 7 previous errors
108