`#[export_stable]` should also check whether items are exportable on non-sdylib crate_types
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Currently #[export_stable] is blindly allowed on all targets on non-sdylib crates.
https://github.com/rust-lang/rust/pull/158221 will fix this to limit the set of targets.
But the set of checks on check_export.rs should also run on all crate_types.
After this is fixed, the exportable.rs test should be adjusted to test this for all crate types.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading check_export.rs to see which exportability checks currently apply only to sdylib crate types. Then inspect tests/ui/attributes/export/exportable.rs and extend its coverage across all crate types; done means the checks run consistently and the UI test passes for each relevant crate type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100