diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-07-31 13:47:32 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-08-09 14:11:50 -0700 |
| commit | 96fd606dddba6bd4773c41be66c44fc076a96ff8 (patch) | |
| tree | 51a9be1731ec2607021333e3c8ad0ebfa5848998 /src/libsyntax/ast.rs | |
| parent | e751c90513b3b7948ffab7b449f0758e4225125e (diff) | |
| download | rust-96fd606dddba6bd4773c41be66c44fc076a96ff8.tar.gz rust-96fd606dddba6bd4773c41be66c44fc076a96ff8.zip | |
std/rustc/rustpkg/syntax: Support the `extern mod = ...` form
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 435be3c71af..17247222c3f 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -951,7 +951,11 @@ pub struct view_item { #[deriving(Clone, Eq, Encodable, Decodable, IterBytes)] pub enum view_item_ { - view_item_extern_mod(ident, ~[@MetaItem], NodeId), + // ident: name used to refer to this crate in the code + // optional @str: if present, this is a location (containing + // arbitrary characters) from which to fetch the crate sources + // For example, extern mod whatever = "github.com/mozilla/rust" + view_item_extern_mod(ident, Option<@str>, ~[@MetaItem], NodeId), view_item_use(~[@view_path]), } |
