Skip to content

1.99 beta crater regression: use of an internal attribute #161917

Closed

Description

@theemathas

This regression was found by the 1.99 crater run.

[INFO] [stdout] error[E0658]: use of an internal attribute
[INFO] [stdout]    --> src/main.rs:165:5
[INFO] [stdout]     |
[INFO] [stdout] 165 |     #[sequential]
[INFO] [stdout]     |     ^^^^^^^^^^^^^
[INFO] [stdout]     |
[INFO] [stdout]     = note: the `rustc_test_entrypoint_marker` attribute is an internal implementation detail that will never be stable
[INFO] [stdout]     = note: this error originates in the attribute macro `sequential` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0658`.

Affects 9 crates. The errors point to #[sequential], #[debug], or #[test].

Activity

  1. added
    regression-from-stable-to-beta
    C-bug
    E-needs-bisection
    E-needs-mcve
    on Aug 28, 2026
  2. added
    needs-triage
    I-prioritize
    on Aug 28, 2026
  3. cyrgani commented on Aug 28, 2026

    @cyrgani
    Contributor

    reduction for sequential-test:

    extern crate proc_macro;
    use proc_macro::TokenStream;
    
    #[proc_macro_attribute]
    pub fn sequential(_attr: TokenStream, item: TokenStream) -> TokenStream {
        item.to_string().parse().unwrap()
    }

    and

    #[test]
    #[x::sequential]
    fn s1() {}
    
    fn main() {}
  4. added
    S-has-mcve
    and removed
    E-needs-mcve
    on Aug 28, 2026
  5. added
    A-attributes
    A-libtest
    on Aug 28, 2026
  6. added
    A-macros
    on Aug 28, 2026
  7. cyrgani commented on Aug 28, 2026

    @cyrgani
    Contributor
  8. 5 remaining items

  9. added
    A-stability
    A-hygiene
    T-compiler
    on Aug 28, 2026
  10. JonathanBrouwer commented on Aug 28, 2026

    @JonathanBrouwer
    Member

    The cause is that #158854 adds a new rustc_test_entrypoint attribute on the expansion of #[test] functions. This attribute has a span that allows the usage of the rustc_attrs feature. The proc macro does .to_string().parse(), losing the span of the attribute.

    I don't see an easy fix for this, especially not one that is low risk enough to land into beta. I'll post a revert PR for #158854.

  11. JonathanBrouwer commented on Aug 28, 2026

    @JonathanBrouwer
    Member

    Revert posted: #161931

  12. mejrs commented on Aug 28, 2026

    @mejrs
    Member

    I don't see an easy fix for this

    It could be a synthetic attribute, like the cfg_trace attributes, meaning (I think) it would be lost if it was roundtripped like above.

  13. JonathanBrouwer commented on Aug 28, 2026

    @JonathanBrouwer
    Member

    I suggested this here, that's probably the best fix indeed
    #161931 (comment)

  14. added 4 commits that reference this issue on Aug 30, 2026
  15. added a commit that references this issue on Aug 31, 2026
  16. removed
    I-prioritize
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-attributesA-hygieneA-libtestA-macrosA-stabilityC-bugS-has-bisectionS-has-mcveT-compilerregression-from-stable-to-beta

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions