|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/transforming-option-ref-issue-127545.rs:5:19 |
| 3 | + | |
| 4 | +LL | arg.unwrap_or(&[]) |
| 5 | + | --------- ^^^ expected `&Vec<i32>`, found `&[_; 0]` |
| 6 | + | | |
| 7 | + | arguments to this method are incorrect |
| 8 | + | |
| 9 | + = note: expected reference `&Vec<i32>` |
| 10 | + found reference `&[_; 0]` |
| 11 | +help: the return type of this call is `&[_; 0]` due to the type of the argument passed |
| 12 | + --> $DIR/transforming-option-ref-issue-127545.rs:5:5 |
| 13 | + | |
| 14 | +LL | arg.unwrap_or(&[]) |
| 15 | + | ^^^^^^^^^^^^^^---^ |
| 16 | + | | |
| 17 | + | this argument influences the return type of `unwrap_or` |
| 18 | +note: method defined here |
| 19 | + --> $SRC_DIR/core/src/option.rs:LL:COL |
| 20 | + |
| 21 | +error[E0308]: mismatched types |
| 22 | + --> $DIR/transforming-option-ref-issue-127545.rs:9:19 |
| 23 | + | |
| 24 | +LL | arg.unwrap_or(v) |
| 25 | + | --------- ^ expected `&Vec<i32>`, found `&[i32]` |
| 26 | + | | |
| 27 | + | arguments to this method are incorrect |
| 28 | + | |
| 29 | + = note: expected reference `&Vec<i32>` |
| 30 | + found reference `&'a [i32]` |
| 31 | +help: the return type of this call is `&'a [i32]` due to the type of the argument passed |
| 32 | + --> $DIR/transforming-option-ref-issue-127545.rs:9:5 |
| 33 | + | |
| 34 | +LL | arg.unwrap_or(v) |
| 35 | + | ^^^^^^^^^^^^^^-^ |
| 36 | + | | |
| 37 | + | this argument influences the return type of `unwrap_or` |
| 38 | +note: method defined here |
| 39 | + --> $SRC_DIR/core/src/option.rs:LL:COL |
| 40 | + |
| 41 | +error: aborting due to 2 previous errors |
| 42 | + |
| 43 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments