2013-02-27 09:01:53 -06:00
|
|
|
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
pub fn main() {
|
2015-01-20 17:45:07 -06:00
|
|
|
assert_eq!(format!("{:?}", vec!(0i, 1)), "[0, 1]".to_string());
|
2013-02-27 09:01:53 -06:00
|
|
|
|
2014-08-06 04:59:40 -05:00
|
|
|
let foo = vec!(3i, 4);
|
2014-08-04 07:19:02 -05:00
|
|
|
let bar: &[int] = &[4, 5];
|
2013-02-27 09:01:53 -06:00
|
|
|
|
2015-01-20 17:45:07 -06:00
|
|
|
assert_eq!(format!("{:?}", foo), "[3, 4]");
|
|
|
|
assert_eq!(format!("{:?}", bar), "[4, 5]");
|
2013-02-27 09:01:53 -06:00
|
|
|
}
|