-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc: Remove support for hyphens in crate names #23786
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit removes parser support for `extern crate "foo" as bar` as the renamed crate is now required to be an identifier. Additionally this commit enables hard errors on crate names that contain hyphens in them, they must now solely contain alphanumeric characters or underscores. If the crate name is inferred from the file name, however, the file name `foo-bar.rs` will have the crate name inferred as `foo_bar`. If a binary is being emitted it will have the name `foo-bar` and a library will have the name `libfoo_bar.rlib`. This commit is a breaking change for a number of reasons: * Old syntax is being removed. This was previously only issuing warnings. * The output for the compiler when input is received on stdin is now `rust_out` instead of `rust-out`. * The crate name for a crate in the file `foo-bar.rs` is now `foo_bar` which can affect infrastructure such as logging. [breaking-change]
Conflicts: src/libsyntax/parse/parser.rs
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
force-pushed
the
less-quotes
branch
from
March 27, 2015 18:08
14de12c
to
a8d387e
Compare
This is currently rebased on #23738 for convenience. |
Closed
alexcrichton
force-pushed
the
less-quotes
branch
from
March 27, 2015 18:44
a8d387e
to
e77db16
Compare
r? @brson |
@bors r+ |
📌 Commit e77db16 has been approved by |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Mar 27, 2015
Conflicts: src/test/auxiliary/static-function-pointer-aux.rs src/test/auxiliary/trait_default_method_xc_aux.rs src/test/run-pass/issue-4545.rs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit removes parser support for
extern crate "foo" as bar
as therenamed crate is now required to be an identifier. Additionally this commit
enables hard errors on crate names that contain hyphens in them, they must now
solely contain alphanumeric characters or underscores.
If the crate name is inferred from the file name, however, the file name
foo-bar.rs
will have the crate name inferred asfoo_bar
. If a binary isbeing emitted it will have the name
foo-bar
and a library will have the namelibfoo_bar.rlib
.This commit is a breaking change for a number of reasons:
rust_out
instead of
rust-out
.foo-bar.rs
is nowfoo_bar
which canaffect infrastructure such as logging.
[breaking-change]
Closes #23533