rust-lang / rust-lang/rust

Stability on `pub use` items is mandatory but has no effect

Open
#146,028 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-stability C-bug T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Currently pub use items must have a stability attribute on them in the stdlib.
At the same time, this attribute does absolutely nothing and is ignored. That's weird and likely to result in bugs. It is possible someone will try to stabilize an item and try to keep its pub use unstable, not realizing this does not work.

We have two options:

  1. Make this have an effect. When an item is used through a pub use, both the item itself and the pub use must be stable for it to work. Not sure how hard this is to implement, I haven't touched that part of the codebase.
  2. Remove stability attributes on pub use items. I could easily implement this.

What is the preferred option here?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by tracing how stability attributes on pub use items are validated and enforced, then compare the proposed enforcement and removal approaches. Done means the project has a decided behavior and the corresponding compiler handling and tests reflect it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.