Skip to content

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

Closed as not planned

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

  1. added
    A-attributesArea: Attributes (`#[…]`, `#![…]`)
    T-langRelevant to the language team
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    on Mar 12, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Mar 12, 2026
  3. theemathas commented on Mar 12, 2026

    @theemathas
    ContributorAuthor

    Presumably regressed in #152985. cc @JonathanBrouwer @jdonszelmann

  4. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Mar 12, 2026
  5. apiraino commented on Mar 12, 2026

    @apiraino
    Contributor

    Assigning priority (discussion on Zulip).

    @rustbot label -I-prioritize +P-medium

  6. added and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Mar 12, 2026
  7. JonathanBrouwer commented on Mar 12, 2026

    @JonathanBrouwer
    Member

    The regression is that the arguments of feature attributes on invalid targets used to be unchecked... ugh
    Minimum reproducer:

    #[feature("meow", this, was, not, checked)]
    mod x {}

    We have the following options

    1. Just leave this unchanged, accepting the breakage
    2. Change this back, then revert with T-lang approval
    3. Change this back

    Given that this is effectively a bug fix, the impact is relatively small, and unfixing this bug is a little annoying, I'd prefer option 1, but if anyone does not like this we can go for option 2 instead

    cc @rust-lang/lang

  8. jieyouxu commented on Mar 12, 2026

    @jieyouxu
    Member

    The calculus is basically:

    I would recommend

    1. Just leave this unchanged, accepting the breakage

    with an explicit T-lang FCP. Or just let it slide with a compat relnotes if T-lang thinks that's fine.

  9. 24 remaining items

  10. removed
    P-lang-drag-0Lang team prioritization drag level 0.https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang.
    on Mar 18, 2026
  11. nikomatsakis commented on Mar 18, 2026

    @nikomatsakis
    Contributor

    @rfcbot reviewed

  12. added
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    and removed
    proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
    on Mar 18, 2026
  13. rust-rfcbot commented on Mar 18, 2026

    @rust-rfcbot
    Collaborator

    🔔 This is now entering its final comment period, as per the review above. 🔔

  14. added
    to-announceAnnounce this issue on triage meeting
    and removed
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    on Mar 28, 2026
  15. rust-rfcbot commented on Mar 28, 2026

    @rust-rfcbot
    Collaborator

    The final comment period, with a disposition to close, as per the review above, is now complete.

    As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

  16. jieyouxu commented on Mar 30, 2026

    @jieyouxu
    Member

    Triage: closing this regression issue as intended and accepted breakage as per FCP above.

  17. added a commit that references this issue on May 7, 2026
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