Skip to content

Can't use vec!() without std #16806

Description

@kmcallister
#![feature(phase)]
#![no_std]

extern crate native;

#[phase(plugin, link)]
extern crate collections;

use collections::vec::Vec;

fn main() {
    let x: Vec<uint> = vec!();
}

fails with

foo.rs:12:24: 12:27 error: macro undefined: 'vec!'

which requires this workaround similar to #16803:

#[phase(plugin)]
extern crate std;

mod std {
    pub use collections::vec;
}

And that has various other negative consequences.

I see that libcollections/macros.rs implements vec!() but it's not exported from the crate, probably because there's no clean way to re-export the macro in libstd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions