Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a path attribute for crate directive #1214

Closed
wants to merge 2 commits into from

Conversation

@lht
Copy link
Contributor

commented Nov 23, 2011

Fix the last part of issue #906.

lht added 2 commits Nov 22, 2011
rustc: Accepts `path` attributes for crate directives
Temporarily allow path specified in either as attribute or in AST, like:

  #[path = "mymod.rs"]
  mod mymod = "mymod.rs";

This is a transitional commit to avoid creating a stage1 snapshot.
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.
@brson

This comment has been minimized.

Copy link
Contributor

commented Nov 25, 2011

Looks great! Integrated.

@brson brson closed this Nov 25, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.