2014-12-20 15:20:51 +13:00
|
|
|
// Tests that we forbid coercion from `[T; n]` to `&[T]`
|
2014-11-05 16:44:48 +13:00
|
|
|
|
|
|
|
fn main() {
|
2015-03-03 10:42:26 +02:00
|
|
|
let _: &[i32] = [0];
|
2015-01-12 01:01:44 -05:00
|
|
|
//~^ ERROR mismatched types
|
2023-01-02 18:00:33 -08:00
|
|
|
//~| expected `&[i32]`, found `[{integer}; 1]`
|
2014-11-05 16:44:48 +13:00
|
|
|
}
|