]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coerce-block-tail-83850.stderr
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[rust.git] / src / test / ui / coercion / coerce-block-tail-83850.stderr
1 error[E0308]: mismatched types
2   --> $DIR/coerce-block-tail-83850.rs:5:7
3    |
4 LL |     f(&Box::new([1, 2]));
5    |     - ^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found struct `Box`
6    |     |
7    |     arguments to this function are incorrect
8    |
9    = note: expected reference `&[i32]`
10               found reference `&Box<[{integer}; 2]>`
11 note: function defined here
12   --> $DIR/coerce-block-tail-83850.rs:2:4
13    |
14 LL | fn f(_: &[i32]) {}
15    |    ^ ---------
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.