bless
This commit is contained in:
parent
79f93a655a
commit
2fa72c7dfe
75
tests/ui/doc/missing_panics_doc.stderr
Normal file
75
tests/ui/doc/missing_panics_doc.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user