rust/tests/ui/missing_panics_doc.stderr

115 lines
3.4 KiB
Plaintext
Raw Normal View History

error: docs for function which may panic missing `# Panics` section
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:6:1
|
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-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:8:5
|
LL | result.unwrap()
| ^^^^^^^^^^^^^^^
error: docs for function which may panic missing `# Panics` section
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:12:1
|
LL | / pub fn panic() {
LL | | panic!("This function panics")
LL | | }
| |_^
|
note: first possible panic found here
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:13:5
|
LL | panic!("This function panics")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2021-10-23 02:42:52 -05:00
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
error: docs for function which may panic missing `# Panics` section
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:17:1
|
LL | / pub fn todo() {
LL | | todo!()
LL | | }
| |_^
|
note: first possible panic found here
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:18:5
|
LL | todo!()
| ^^^^^^^
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
error: docs for function which may panic missing `# Panics` section
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:22:1
|
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-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:25:13
|
LL | panic!()
| ^^^^^^^^
2021-10-23 02:42:52 -05:00
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
error: docs for function which may panic missing `# Panics` section
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:31:1
|
LL | / pub fn unreachable_and_panic() {
LL | | if true { unreachable!() } else { panic!() }
LL | | }
| |_^
|
note: first possible panic found here
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:32:39
|
LL | if true { unreachable!() } else { panic!() }
| ^^^^^^^^
2021-10-23 02:42:52 -05:00
= note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
error: docs for function which may panic missing `# Panics` section
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:36:1
|
LL | / pub fn assert_eq() {
LL | | let x = 0;
LL | | assert_eq!(x, 0);
LL | | }
| |_^
|
note: first possible panic found here
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:38:5
|
LL | assert_eq!(x, 0);
| ^^^^^^^^^^^^^^^^
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: docs for function which may panic missing `# Panics` section
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:42:1
|
LL | / pub fn assert_ne() {
LL | | let x = 0;
LL | | assert_ne!(x, 0);
LL | | }
| |_^
|
note: first possible panic found here
2021-10-23 02:42:52 -05:00
--> $DIR/missing_panics_doc.rs:44:5
|
LL | assert_ne!(x, 0);
| ^^^^^^^^^^^^^^^^
= note: this error originates in the macro `assert_ne` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 7 previous errors