]> git.lizzy.rs Git - rust.git/blob - tests/ui/missing_panics_doc.stderr
Merge remote-tracking branch 'upstream/beta' into backport_remerge
[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:7:1
3    |
4 LL | / pub fn unwrap() {
5 LL | |     let result = Err("Hi");
6 LL | |     result.unwrap()
7 LL | | }
8    | |_^
9    |
10    = note: `-D clippy::missing-panics-doc` implied by `-D warnings`
11 note: first possible panic found here
12   --> $DIR/missing_panics_doc.rs:9:5
13    |
14 LL |     result.unwrap()
15    |     ^^^^^^^^^^^^^^^
16
17 error: docs for function which may panic missing `# Panics` section
18   --> $DIR/missing_panics_doc.rs:13: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:14:5
27    |
28 LL |     panic!("This function panics")
29    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
31
32 error: docs for function which may panic missing `# Panics` section
33   --> $DIR/missing_panics_doc.rs:18:1
34    |
35 LL | / pub fn todo() {
36 LL | |     todo!()
37 LL | | }
38    | |_^
39    |
40 note: first possible panic found here
41   --> $DIR/missing_panics_doc.rs:19:5
42    |
43 LL |     todo!()
44    |     ^^^^^^^
45    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
46
47 error: docs for function which may panic missing `# Panics` section
48   --> $DIR/missing_panics_doc.rs:23:1
49    |
50 LL | / pub fn inner_body(opt: Option<u32>) {
51 LL | |     opt.map(|x| {
52 LL | |         if x == 10 {
53 LL | |             panic!()
54 LL | |         }
55 LL | |     });
56 LL | | }
57    | |_^
58    |
59 note: first possible panic found here
60   --> $DIR/missing_panics_doc.rs:26:13
61    |
62 LL |             panic!()
63    |             ^^^^^^^^
64    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
65
66 error: docs for function which may panic missing `# Panics` section
67   --> $DIR/missing_panics_doc.rs:32:1
68    |
69 LL | / pub fn unreachable_and_panic() {
70 LL | |     if true { unreachable!() } else { panic!() }
71 LL | | }
72    | |_^
73    |
74 note: first possible panic found here
75   --> $DIR/missing_panics_doc.rs:33:39
76    |
77 LL |     if true { unreachable!() } else { panic!() }
78    |                                       ^^^^^^^^
79    = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
80
81 error: docs for function which may panic missing `# Panics` section
82   --> $DIR/missing_panics_doc.rs:37:1
83    |
84 LL | / pub fn assert_eq() {
85 LL | |     let x = 0;
86 LL | |     assert_eq!(x, 0);
87 LL | | }
88    | |_^
89    |
90 note: first possible panic found here
91   --> $DIR/missing_panics_doc.rs:39:5
92    |
93 LL |     assert_eq!(x, 0);
94    |     ^^^^^^^^^^^^^^^^^
95    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
96
97 error: docs for function which may panic missing `# Panics` section
98   --> $DIR/missing_panics_doc.rs:43:1
99    |
100 LL | / pub fn assert_ne() {
101 LL | |     let x = 0;
102 LL | |     assert_ne!(x, 0);
103 LL | | }
104    | |_^
105    |
106 note: first possible panic found here
107   --> $DIR/missing_panics_doc.rs:45:5
108    |
109 LL |     assert_ne!(x, 0);
110    |     ^^^^^^^^^^^^^^^^^
111    = note: this error originates in the macro `assert_ne` (in Nightly builds, run with -Z macro-backtrace for more info)
112
113 error: aborting due to 7 previous errors
114