This commit is contained in:
Kisaragi Marine 2023-06-14 22:16:20 +09:00
parent 79f93a655a
commit 2fa72c7dfe
No known key found for this signature in database
GPG Key ID: 62B80306B822AE9E

View File

@ -0,0 +1,75 @@
error: docs for function which may panic missing `# Panics` section
--> $DIR/missing_panics_doc.rs:3:1
|
LL | pub fn option_unwrap<T>(v: &[T]) -> &T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> $DIR/missing_panics_doc.rs:5:5
|
LL | o.unwrap()
| ^^^^^^^^^^
= note: `-D clippy::missing-panics-doc` implied by `-D warnings`
error: docs for function which may panic missing `# Panics` section
--> $DIR/missing_panics_doc.rs:8:1
|
LL | pub fn option_expect<T>(v: &[T]) -> &T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> $DIR/missing_panics_doc.rs:10:5
|
LL | o.expect("passed an empty thing")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: docs for function which may panic missing `# Panics` section
--> $DIR/missing_panics_doc.rs:13:1
|
LL | pub fn result_unwrap<T>(v: &[T]) -> &T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> $DIR/missing_panics_doc.rs:15:5
|
LL | res.unwrap()
| ^^^^^^^^^^^^
error: docs for function which may panic missing `# Panics` section
--> $DIR/missing_panics_doc.rs:18:1
|
LL | pub fn result_expect<T>(v: &[T]) -> &T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> $DIR/missing_panics_doc.rs:20:5
|
LL | res.expect("passed an empty thing")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: docs for function which may panic missing `# Panics` section
--> $DIR/missing_panics_doc.rs:23:1
|
LL | pub fn last_unwrap(v: &[u32]) -> u32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> $DIR/missing_panics_doc.rs:24:6
|
LL | *v.last().unwrap()
| ^^^^^^^^^^^^^^^^^
error: docs for function which may panic missing `# Panics` section
--> $DIR/missing_panics_doc.rs:27:1
|
LL | pub fn last_expect(v: &[u32]) -> u32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> $DIR/missing_panics_doc.rs:28:6
|
LL | *v.last().expect("passed an empty thing")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors