aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/vec-ref-count.rs
blob: 86ba642b61f640a964c1c08f1234ad839a34c85a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
use std;
import std::_vec;

fn main() {
    auto v = vec(1, 2, 3);
    log_err _vec::refcount[int](v);
    log_err _vec::refcount[int](v);
    log_err _vec::refcount[int](v);
    assert (_vec::refcount[int](v) == 1u || _vec::refcount[int](v) == 2u);
    assert (_vec::refcount[int](v) == 1u || _vec::refcount[int](v) == 2u);
}