Note This question contains syntax that predates Rust 1.0. The code is invalid, but the concepts are still relevant.
How do
Another way to do it nowadays is:
const A: &'static str = "Apples"; const B: &'static str = "Oranges"; const AB: [&'static str; 2] = [A, B]; // or ["Apples", "Oranges"]