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

librustc: Remove the ability for extern crate to specify crate IDs. #14887

Closed
wants to merge 1 commit into from

Conversation

pcwalton
Copy link
Contributor

Issue #14468.

After a snapshot, it will be possible to remove the extern crate foo = STRING syntax in favor of the new extern crate foo = IDENT.

This will break crates that have names that are not valid Rust
identifiers (in particular, those that contain hyphens). Change such
crates to have names that correspond to valid Rust identifiers. (Most
commonly, this will involve changing hyphens to underscores.)

[breaking-change]

r? @brson

This may require an RFC to be merged first, but I wanted to go ahead and get the work done.

Issue rust-lang#14468.

After a snapshot, it will be possible to remove the `extern crate foo =
STRING` syntax in favor of the new `extern crate foo = IDENT`.

This will break crates that have names that are not valid Rust
identifiers (in particular, those that contain hyphens). Change such
crates to have names that correspond to valid Rust identifiers. (Most
commonly, this will involve changing hyphens to underscores.)

[breaking-change]
@alexcrichton
Copy link
Member

The corresponding RFC for this is rust-lang/rfcs#109, and this should probably wait for that to be merged.

@flaper87
Copy link
Contributor

Also, the RFC should be mentioned in the commit message. Something to do during the rebase.

@alexcrichton
Copy link
Member

The RFC has been accepted now, and the relevant section for this issue dictates that the syntax is still extern crate foo = "string-literal", but the string literal now only accepts a subset of the characters accepted today. Notably, the string-literal must be a valid rust identifier with the exception that a - character is allowed in any position other than the first.

@alexcrichton
Copy link
Member

Superseded by #15319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants