rust-lang / rust-lang/libs-team
Could not find module `Ident(mask_impl)`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 178
- Forks
- 28
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
This relatively recent code in the standard library is problematic for the cargo-unstable-api tool:
It fails with:
Error: could not find module `Ident(mask_impl)` in any of [
"library/core/src/../../portable-simd/crates/core_simd/src/masks/mask_impl.rs",
"library/core/src/../../portable-simd/crates/core_simd/src/masks/mask_impl/mod.rs",
] (this is a bug)
One of the cfg_attrs is a not of the other one, so at least one should definitely apply — that is, the tool should be loading either core_simd/src/masks/full_masks.rs or core_simd/src/masks/bitmask.rs (if the intention is to display the API for a single configuration only) or both (if the intention is to display the API of all configurations), but never core_simd/src/masks/mask_impl.rs or core_simd/src/masks/mask_impl/mod.rs.
The syn-inline-mod crate already implements loading of modules behind cfg attributes, so it shouldn't be necessary to reimplement all this logic in cargo-unstable-api.
Contributor guide
No contributing guide indexed for this repository
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 in the cargo-unstable-api module-loading path and reproduce the failure using library/portable-simd/crates/core_simd/src/masks.rs. Compare the existing cfg-attribute handling with syn-inline-mod, then verify that loading selects full_masks.rs or bitmask.rs rather than mask_impl.rs; done means the reported module error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100