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