about summary refs log tree commit diff
path: root/src/libsyntax/std_inject.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-26 17:35:13 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-27 10:19:59 -0700
commitb24a3b82011c3b78573ace4ade3f99d7c4701a11 (patch)
tree9f9ac3cf9772ff71bfe85fba9ee6d870e67dab9c /src/libsyntax/std_inject.rs
parent36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157 (diff)
downloadrust-b24a3b82011c3b78573ace4ade3f99d7c4701a11.tar.gz
rust-b24a3b82011c3b78573ace4ade3f99d7c4701a11.zip
rustc: Remove support for hyphens in crate names
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]
Diffstat (limited to 'src/libsyntax/std_inject.rs')
0 files changed, 0 insertions, 0 deletions