Skip to content

Expected location of #![feature(...)] is not obvious #28944

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

Closed
absoludity opened this issue Oct 10, 2015 · 0 comments
Closed

Expected location of #![feature(...)] is not obvious #28944

absoludity opened this issue Oct 10, 2015 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@absoludity
Copy link

I added the augmented_assignments feature to the file I was working on, but when testing, the compiler complained:

error: overloaded augmented assignments are not stable
help: add #![feature(augmented_assignments)] to the crate features to enable

I thought I had already done that, but it turns out it isn't enough to be in the source file using the feature. In retrospect (now that I know from help on IRC what the issue is), I'd expect the error to say:

error: overloaded augmented assignments are not stable
help: add #![feature(augmented_assignments)] to the crate root file (src/lib.rs) to enable

or something to that effect.

$ rustc --version --verbose
rustc 1.5.0-nightly (87cd2c082 2015-10-10)
binary: rustc
commit-hash: 87cd2c08273dec5c8db8e59f4231b8e69aa9b85b
commit-date: 2015-10-10
host: x86_64-unknown-linux-gnu
release: 1.5.0-nightly
@steveklabnik steveklabnik added the A-diagnostics Area: Messages for errors, warnings, and lints label Oct 10, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Oct 10, 2015
"Crate features" isn't a thing in Rust, but you do need to add this line
to your crate root.

Fixes rust-lang#28944
bors added a commit that referenced this issue Oct 11, 2015
"Crate features" isn't a thing in Rust, but you do need to add this line
to your crate root.

Fixes #28944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

2 participants