Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cycles in name resolution 2.0 #2733

Open
CohenArthur opened this issue Nov 8, 2023 · 2 comments
Open

Handle cycles in name resolution 2.0 #2733

CohenArthur opened this issue Nov 8, 2023 · 2 comments
Assignees

Comments

@CohenArthur
Copy link
Member

#2620 (comment)

@P-E-P
Copy link
Member

P-E-P commented Nov 30, 2023

@matthewjasper Do you have any rust example of cycles ? I initially thought this would be with super with no avail.

@matthewjasper
Copy link
Contributor

I meant something like this:

pub mod a {
    pub use crate::b::*;
    pub struct A {}
}

mod b {
    pub use crate::a::*;
    pub use crate::c::*;
    pub struct B {}
}

mod c {
    pub use crate::b::*;
}

fn main() {
    let _x = b::A {};
    let _y = c::A {};
    let _z = c::B {};
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants