rust/tests/ui/coercion/vec-macro-coercions.rs
Ralf Jung 5e65109f21 add write_box_via_move intrinsic and use it for vec!
This allows us to get rid of box_new entirely
2026-02-16 17:27:40 +01:00

12 lines
235 B
Rust

//@ check-pass
fn main() {
let functions = &vec![
|x: i32| -> i32 { x + 3 },
|x: i32| -> i32 { x + 3 },
];
let string = String::new();
let a = vec![&string, "abc"];
let b = vec!["abc", &string];
}