about summary refs log tree commit diff
path: root/src/test/compile-fail/bad-crate-id2.rs
AgeCommit message (Collapse)AuthorLines
2015-03-27rustc: Remove support for hyphens in crate namesAlex Crichton-14/+0
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]
2015-03-24rustc: Add support for `extern crate foo as bar`Alex Crichton-0/+1
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc #23533
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-1/+0
2014-08-23extern crate foobar as foo;wickerwaka-1/+1
Implements remaining part of RFC #47. Addresses issue #16461. Removed link_attrs from rust.md, they don't appear to be supported by the parser. Changed all the tests to use the new extern crate syntax Change pretty printer to use 'as' syntax
2014-07-05rustc: Default #[crate_name] on input, not outputAlex Crichton-1/+1
2014-07-05test: Fix tests for crate_id removalAlex Crichton-0/+14
This involved removing some tests whose functionality was removed such as many of the crateresolve tests