Skip to content

Could not find module Ident(mask_impl) #98

Open
@dtolnay

Description

@dtolnay

This relatively recent code in the standard library is problematic for the cargo-unstable-api tool:

https://github.com/rust-lang/rust/blob/1.63.0/library/portable-simd/crates/core_simd/src/masks.rs#L5-L13

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions