Skip to content

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

Closed
@absoludity

Description

@absoludity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions