blob: 5bbbffe4e60e1f36ce8b25554c42d8ae46128787 [file] [log] [blame]
#![feature(slice_patterns)]
fn bar(a: &'static str, b: &'static str) -> [&'static str; 4] {
[a, b, b, a]
}
fn main() {
let out = bar("baz", "foo");
let [a, xs.., d] = out;
assert_eq!(a, "baz");
assert_eq!(xs, ["foo", "foo"]);
assert_eq!(d, "baz");
}