2021-02-02 22:43:30 -06:00
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:7:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | / pub fn unwrap() {
|
|
|
|
LL | | let result = Err("Hi");
|
|
|
|
LL | | result.unwrap()
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::missing-panics-doc` implied by `-D warnings`
|
|
|
|
note: first possible panic found here
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:9:5
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | result.unwrap()
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:13:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | / pub fn panic() {
|
|
|
|
LL | | panic!("This function panics")
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:14:5
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | panic!("This function panics")
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:18:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | / pub fn todo() {
|
|
|
|
LL | | todo!()
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:19:5
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | todo!()
|
|
|
|
| ^^^^^^^
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:23:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | / pub fn inner_body(opt: Option<u32>) {
|
|
|
|
LL | | opt.map(|x| {
|
|
|
|
LL | | if x == 10 {
|
|
|
|
LL | | panic!()
|
|
|
|
LL | | }
|
|
|
|
LL | | });
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:26:13
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | panic!()
|
|
|
|
| ^^^^^^^^
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2021-02-02 22:43:30 -06:00
|
|
|
|
2021-02-25 04:25:22 -06:00
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:32:1
|
2021-02-25 04:25:22 -06:00
|
|
|
|
|
|
|
|
LL | / pub fn unreachable_and_panic() {
|
2021-03-12 08:30:50 -06:00
|
|
|
LL | | if true { unreachable!() } else { panic!() }
|
2021-02-25 04:25:22 -06:00
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-04-08 10:50:13 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:33:39
|
2021-02-25 04:25:22 -06:00
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
LL | if true { unreachable!() } else { panic!() }
|
|
|
|
| ^^^^^^^^
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2021-02-25 04:25:22 -06:00
|
|
|
|
2021-04-08 10:50:13 -05:00
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:37:1
|
|
|
|
|
|
|
|
|
LL | / pub fn assert_eq() {
|
|
|
|
LL | | let x = 0;
|
|
|
|
LL | | assert_eq!(x, 0);
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:39:5
|
|
|
|
|
|
|
|
|
LL | assert_eq!(x, 0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:43:1
|
|
|
|
|
|
|
|
|
LL | / pub fn assert_ne() {
|
|
|
|
LL | | let x = 0;
|
|
|
|
LL | | assert_ne!(x, 0);
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:45:5
|
|
|
|
|
|
|
|
|
LL | assert_ne!(x, 0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `assert_ne` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
2021-02-02 22:43:30 -06:00
|
|
|
|