Skip to content

1.95 beta regression: "malformed feature attribute input" #153764

Description

@theemathas

Regression found in the 1.95.0 beta crater run.

[INFO] [stdout] error[E0565]: malformed `feature` attribute input
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/assemble-core-0.2.0/src/unstable.rs:16:5
[INFO] [stdout]    |
[INFO] [stdout] 16 |     #[feature(feature = "text_factory")]
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^----------------^^
[INFO] [stdout]    |     |                 |
[INFO] [stdout]    |     |                 didn't expect any arguments here
[INFO] [stdout]    |     help: must be of the form: `#[feature(feature1, feature2, ...)]`
[INFO] [stdout] error[E0539]: malformed `feature` attribute input
[INFO] [stdout]  --> src/models/whisper/mod.rs:1:1
[INFO] [stdout]   |
[INFO] [stdout] 1 | #![feature("whisper")]
[INFO] [stdout]   | ^^^^^^^^^^^---------^^
[INFO] [stdout]   | |          |
[INFO] [stdout]   | |          expected a valid identifier here
[INFO] [stdout]   | help: must be of the form: `#![feature(feature1, feature2, ...)]`
[INFO] [stdout] error[E0539]: malformed `feature` attribute input
[INFO] [stdout]  --> src/lib.rs:4:1
[INFO] [stdout]   |
[INFO] [stdout] 4 | #[feature("serde_feature")]
[INFO] [stdout]   | ^^^^^^^^^^---------------^^
[INFO] [stdout]   | |         |
[INFO] [stdout]   | |         expected a valid identifier here
[INFO] [stdout]   | help: must be of the form: `#[feature(feature1, feature2, ...)]`
[INFO] [stdout] error[E0539]: malformed `feature` attribute input
[INFO] [stdout]  --> src/lib.rs:4:1
[INFO] [stdout]   |
[INFO] [stdout] 4 | #[feature("proc_macro_lib2")]
[INFO] [stdout]   | ^^^^^^^^^^-----------------^^
[INFO] [stdout]   | |         |
[INFO] [stdout]   | |         expected a valid identifier here
[INFO] [stdout]   | help: must be of the form: `#[feature(feature1, feature2, ...)]`

In four out of the five affected crates, it seems like the authors of the code intended to write cfg(feature = "something"). In starlane-primitive-macros, it seems the author wrote #[feature(....)] when they meant #![feature(....)], with a !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamdisposition-closeThis PR / issue is in PFCP or FCP with a disposition to close it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.relnotesMarks issues that should be documented in the release notes of the next release.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions