]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/missing_panics_doc.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / missing_panics_doc.stderr
1 error: docs for function which may panic missing `# Panics` section
2 --> $DIR/missing_panics_doc.rs:13:1
3 |
4 LL | pub fn unwrap() {
5 | ^^^^^^^^^^^^^^^
6 |
7 note: first possible panic found here
8 --> $DIR/missing_panics_doc.rs:15:5
9 |
10 LL | result.unwrap()
11 | ^^^^^^^^^^^^^^^
12 = note: `-D clippy::missing-panics-doc` implied by `-D warnings`
13 = help: to override `-D warnings` add `#[allow(clippy::missing_panics_doc)]`
14
15 error: docs for function which may panic missing `# Panics` section
16 --> $DIR/missing_panics_doc.rs:19:1
17 |
18 LL | pub fn panic() {
19 | ^^^^^^^^^^^^^^
20 |
21 note: first possible panic found here
22 --> $DIR/missing_panics_doc.rs:20:5
23 |
24 LL | panic!("This function panics")
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27 error: docs for function which may panic missing `# Panics` section
28 --> $DIR/missing_panics_doc.rs:24:1
29 |
30 LL | pub fn inner_body(opt: Option<u32>) {
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 |
33 note: first possible panic found here
34 --> $DIR/missing_panics_doc.rs:27:13
35 |
36 LL | panic!()
37 | ^^^^^^^^
38
39 error: docs for function which may panic missing `# Panics` section
40 --> $DIR/missing_panics_doc.rs:33:1
41 |
42 LL | pub fn unreachable_and_panic() {
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |
45 note: first possible panic found here
46 --> $DIR/missing_panics_doc.rs:34:39
47 |
48 LL | if true { unreachable!() } else { panic!() }
49 | ^^^^^^^^
50
51 error: docs for function which may panic missing `# Panics` section
52 --> $DIR/missing_panics_doc.rs:38:1
53 |
54 LL | pub fn assert_eq() {
55 | ^^^^^^^^^^^^^^^^^^
56 |
57 note: first possible panic found here
58 --> $DIR/missing_panics_doc.rs:40:5
59 |
60 LL | assert_eq!(x, 0);
61 | ^^^^^^^^^^^^^^^^
62
63 error: docs for function which may panic missing `# Panics` section
64 --> $DIR/missing_panics_doc.rs:44:1
65 |
66 LL | pub fn assert_ne() {
67 | ^^^^^^^^^^^^^^^^^^
68 |
69 note: first possible panic found here
70 --> $DIR/missing_panics_doc.rs:46:5
71 |
72 LL | assert_ne!(x, 0);
73 | ^^^^^^^^^^^^^^^^
74
75 error: docs for function which may panic missing `# Panics` section
76 --> $DIR/missing_panics_doc.rs:151:5
77 |
78 LL | pub fn option_unwrap<T>(v: &[T]) -> &T {
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80 |
81 note: first possible panic found here
82 --> $DIR/missing_panics_doc.rs:153:9
83 |
84 LL | o.unwrap()
85 | ^^^^^^^^^^
86
87 error: docs for function which may panic missing `# Panics` section
88 --> $DIR/missing_panics_doc.rs:156:5
89 |
90 LL | pub fn option_expect<T>(v: &[T]) -> &T {
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92 |
93 note: first possible panic found here
94 --> $DIR/missing_panics_doc.rs:158:9
95 |
96 LL | o.expect("passed an empty thing")
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98
99 error: docs for function which may panic missing `# Panics` section
100 --> $DIR/missing_panics_doc.rs:161:5
101 |
102 LL | pub fn result_unwrap<T>(v: &[T]) -> &T {
103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 |
105 note: first possible panic found here
106 --> $DIR/missing_panics_doc.rs:163:9
107 |
108 LL | res.unwrap()
109 | ^^^^^^^^^^^^
110
111 error: docs for function which may panic missing `# Panics` section
112 --> $DIR/missing_panics_doc.rs:166:5
113 |
114 LL | pub fn result_expect<T>(v: &[T]) -> &T {
115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116 |
117 note: first possible panic found here
118 --> $DIR/missing_panics_doc.rs:168:9
119 |
120 LL | res.expect("passed an empty thing")
121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122
123 error: docs for function which may panic missing `# Panics` section
124 --> $DIR/missing_panics_doc.rs:171:5
125 |
126 LL | pub fn last_unwrap(v: &[u32]) -> u32 {
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128 |
129 note: first possible panic found here
130 --> $DIR/missing_panics_doc.rs:172:10
131 |
132 LL | *v.last().unwrap()
133 | ^^^^^^^^^^^^^^^^^
134
135 error: docs for function which may panic missing `# Panics` section
136 --> $DIR/missing_panics_doc.rs:175:5
137 |
138 LL | pub fn last_expect(v: &[u32]) -> u32 {
139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140 |
141 note: first possible panic found here
142 --> $DIR/missing_panics_doc.rs:176:10
143 |
144 LL | *v.last().expect("passed an empty thing")
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146
147 error: aborting due to 12 previous errors
148