Skip to content

Commit

Permalink
Rename test file to please tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jul 11, 2024
1 parent 7e719c9 commit 1f36334
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-127545-option-of-ref.rs:5:5
--> $DIR/transforming-option-ref-issue-127545.rs:5:5
|
LL | pub fn foo(arg: Option<&Vec<i32>>) -> Option<&[i32]> {
| -------------- expected `Option<&[i32]>` because of return type
Expand All @@ -14,7 +14,7 @@ LL | arg.map(|v| &**v)
| ++++++++++++++

error[E0308]: mismatched types
--> $DIR/issue-127545-option-of-ref.rs:9:19
--> $DIR/transforming-option-ref-issue-127545.rs:9:19
|
LL | arg.unwrap_or(&[])
| --------- ^^^ expected `&Vec<i32>`, found `&[_; 0]`
Expand All @@ -24,7 +24,7 @@ LL | arg.unwrap_or(&[])
= note: expected reference `&Vec<i32>`
found reference `&[_; 0]`
help: the return type of this call is `&[_; 0]` due to the type of the argument passed
--> $DIR/issue-127545-option-of-ref.rs:9:5
--> $DIR/transforming-option-ref-issue-127545.rs:9:5
|
LL | arg.unwrap_or(&[])
| ^^^^^^^^^^^^^^---^
Expand All @@ -38,7 +38,7 @@ LL | arg.map_or(&[], |v| v)
| ~~~~~~~~~~~~~~~~~~

error[E0308]: mismatched types
--> $DIR/issue-127545-option-of-ref.rs:13:19
--> $DIR/transforming-option-ref-issue-127545.rs:13:19
|
LL | arg.unwrap_or(v)
| --------- ^ expected `&Vec<i32>`, found `&[i32]`
Expand All @@ -48,7 +48,7 @@ LL | arg.unwrap_or(v)
= note: expected reference `&Vec<i32>`
found reference `&'a [i32]`
help: the return type of this call is `&'a [i32]` due to the type of the argument passed
--> $DIR/issue-127545-option-of-ref.rs:13:5
--> $DIR/transforming-option-ref-issue-127545.rs:13:5
|
LL | arg.unwrap_or(v)
| ^^^^^^^^^^^^^^-^
Expand Down

0 comments on commit 1f36334

Please sign in to comment.