Skip to content

Hundreds of missing stability attribute errors with trivial Externally Implementable Item (eii) function in library/std #150514

Closed

Description

@Enselic

Step-by-step:

  1. Add this simple eii function to library/std/src/lib.rs (like done in PR experiment: Add simple externally implementable item to std #150513):
#![feature(extern_item_impls)]

// ...

#[unstable(feature = "extern_item_impls", issue = "125418")]
#[eii]
pub fn changed_with_eii() -> bool {
    false
}
  1. Try to build
./x build library/std

Expected

No errors.

Actual

More than 800 missing stability attribute errors. See https://gist.github.com/Enselic/c643f454515db6f10caa7ab04045ab32 for all errors. The first three are:

$ ./x build library/std
   Compiling std v0.0.0 (/home/martin/src/rust-eii-unix-sigpipe/library/std)
error: attribute macro has missing stability attribute
    --> library/std/src/lib.rs:766:1
     |
 766 | #[eii]
     | ^^^^^^ in this attribute macro expansion
     |
    ::: library/core/src/macros/mod.rs:1899:5
     |
1899 |     pub macro eii($item:item) {
     |     ------------- in this expansion of `#[eii]`

error: function has missing stability attribute
   --> library/std/src/io/stdio.rs:726:1
    |
726 | pub fn cleanup() {
    | ^^^^^^^^^^^^^^^^

error: module has missing stability attribute
  --> library/std/src/sys/mod.rs:16:1
   |
16 | pub mod args;
   | ^^^^^^^^^^^^

Context

I am looking into replacing -Zon-broken-pipe=... with an eii. While doing so I encountered this problem. Tracking issue: #150588

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    on Dec 30, 2025
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Dec 30, 2025
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Dec 30, 2025
  4. added
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    and removed
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    on Dec 30, 2025
  5. removed
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    on Dec 31, 2025
  6. Enselic commented on Jan 2, 2026

    @Enselic
    MemberAuthor
  7. added 3 commits that reference this issue on Jan 9, 2026
  8. added a commit that references this issue on Jan 9, 2026
  9. added a commit that references this issue on Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.F-extern_item_impls`#![feature(extern_item_impls)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions