rustc: Add a path attribute for crate directives
The path information was an optional "filename" component of crate directive AST. It is now replaced by an attribute with metadata named "path". With this commit, a directive mod foo = "foo.rs"; should be written as: #[path = "foo.rs"] mod foo; Closes issue #906.
This commit is contained in:
parent
547ec241bd
commit
3e303af86b
12 changed files with 57 additions and 44 deletions
|
|
@ -58,8 +58,8 @@ type crate_ =
|
|||
config: crate_cfg};
|
||||
|
||||
tag crate_directive_ {
|
||||
cdir_src_mod(ident, option::t<filename>, [attribute]);
|
||||
cdir_dir_mod(ident, option::t<filename>, [@crate_directive], [attribute]);
|
||||
cdir_src_mod(ident, [attribute]);
|
||||
cdir_dir_mod(ident, [@crate_directive], [attribute]);
|
||||
cdir_view_item(@view_item);
|
||||
cdir_syntax(path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue