2021-02-02 22:43:30 -06:00
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:6:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
2022-11-02 06:47:46 -05:00
|
|
|
LL | pub fn unwrap() {
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:8:5
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | result.unwrap()
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::missing-panics-doc` implied by `-D warnings`
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:12:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
2022-11-02 06:47:46 -05:00
|
|
|
LL | pub fn panic() {
|
|
|
|
| ^^^^^^^^^^^^^^
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:13:5
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | panic!("This function panics")
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:17:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
2022-11-02 06:47:46 -05:00
|
|
|
LL | pub fn todo() {
|
|
|
|
| ^^^^^^^^^^^^^
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:18:5
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | todo!()
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:22:1
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
2022-11-02 06:47:46 -05:00
|
|
|
LL | pub fn inner_body(opt: Option<u32>) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:25:13
|
2021-02-02 22:43:30 -06:00
|
|
|
|
|
|
|
|
LL | panic!()
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2021-02-25 04:25:22 -06:00
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:31:1
|
2021-02-25 04:25:22 -06:00
|
|
|
|
|
2022-11-02 06:47:46 -05:00
|
|
|
LL | pub fn unreachable_and_panic() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-02-25 04:25:22 -06:00
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:32: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-25 04:25:22 -06:00
|
|
|
|
2021-04-08 10:50:13 -05:00
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:36:1
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
2022-11-02 06:47:46 -05:00
|
|
|
LL | pub fn assert_eq() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:38:5
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
|
|
|
LL | assert_eq!(x, 0);
|
2021-10-14 13:28:30 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:42:1
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
2022-11-02 06:47:46 -05:00
|
|
|
LL | pub fn assert_ne() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
|
|
|
note: first possible panic found here
|
2021-11-04 07:52:36 -05:00
|
|
|
--> $DIR/missing_panics_doc.rs:44:5
|
2021-04-08 10:50:13 -05:00
|
|
|
|
|
|
|
|
LL | assert_ne!(x, 0);
|
2021-10-14 13:28:30 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2021-04-08 10:50:13 -05:00
|
|
|
|
2023-06-16 02:37:19 -05:00
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:158:5
|
|
|
|
|
|
|
|
|
LL | pub fn option_unwrap<T>(v: &[T]) -> &T {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:160:9
|
|
|
|
|
|
|
|
|
LL | o.unwrap()
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:163:5
|
|
|
|
|
|
|
|
|
LL | pub fn option_expect<T>(v: &[T]) -> &T {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:165:9
|
|
|
|
|
|
|
|
|
LL | o.expect("passed an empty thing")
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:168:5
|
|
|
|
|
|
|
|
|
LL | pub fn result_unwrap<T>(v: &[T]) -> &T {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:170:9
|
|
|
|
|
|
|
|
|
LL | res.unwrap()
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:173:5
|
|
|
|
|
|
|
|
|
LL | pub fn result_expect<T>(v: &[T]) -> &T {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:175:9
|
|
|
|
|
|
|
|
|
LL | res.expect("passed an empty thing")
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:178:5
|
|
|
|
|
|
|
|
|
LL | pub fn last_unwrap(v: &[u32]) -> u32 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:179:10
|
|
|
|
|
|
|
|
|
LL | *v.last().unwrap()
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: docs for function which may panic missing `# Panics` section
|
|
|
|
--> $DIR/missing_panics_doc.rs:182:5
|
|
|
|
|
|
|
|
|
LL | pub fn last_expect(v: &[u32]) -> u32 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: first possible panic found here
|
|
|
|
--> $DIR/missing_panics_doc.rs:183:10
|
|
|
|
|
|
|
|
|
LL | *v.last().expect("passed an empty thing")
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 13 previous errors
|
2021-02-02 22:43:30 -06:00
|
|
|
|