]> git.lizzy.rs Git - rust.git/blob - tests/ui/doc_panics.stderr
Add non_octal_unix_permissions lint
[rust.git] / tests / ui / doc_panics.stderr
1 error: docs for function which may panic missing `# Panics` section
2   --> $DIR/doc_panics.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/doc_panics.rs:9:5
13    |
14 LL |     result.unwrap()
15    |     ^^^^^^^^^^^^^^^
16
17 error: docs for function which may panic missing `# Panics` section
18   --> $DIR/doc_panics.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/doc_panics.rs:14:5
27    |
28 LL |     panic!("This function panics")
29    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30    = note: this error originates in a macro (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/doc_panics.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/doc_panics.rs:19:5
42    |
43 LL |     todo!()
44    |     ^^^^^^^
45    = note: this error originates in a macro (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/doc_panics.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/doc_panics.rs:26:13
61    |
62 LL |             panic!()
63    |             ^^^^^^^^
64    = note: this error originates in a macro (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/doc_panics.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/doc_panics.rs:33:39
76    |
77 LL |     if true { unreachable!() } else { panic!() }
78    |                                       ^^^^^^^^
79    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
80
81 error: aborting due to 5 previous errors
82