Skip to content

Modules need to be inserted in the type namespace #4403

@CohenArthur

Description

@CohenArthur
mod test {
    mod Toto {

    }

    struct Toto;
}

https://godbolt.org/z/r55x4jrGh

Thanks to @P-E-P for the testcase and godbolt link

This is important as the prelude import in core fails since it only contains a mod declaration for v1:

// core/src/lib.rs
use prelude::v1::*;

// core/src/prelude/mod.rs
pub mod v1;

// core/src/prelude/v1.rs
pub use crate::option::Option::{None, Some};

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions