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

Infinite loop in try_push_visible_item_path #57500

Open
hvenev opened this issue Jan 10, 2019 · 2 comments
Open

Infinite loop in try_push_visible_item_path #57500

hvenev opened this issue Jan 10, 2019 · 2 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@hvenev
Copy link
Contributor

hvenev commented Jan 10, 2019

This happens when an item has an infinite number of visible names:

// pathlooptest/src/lib.rs
pub struct AStruct;

pub mod prelude {
    pub use crate as pathlooptest;
    pub use crate::AStruct;
}
// main.rs
use pathlooptest::prelude::*;

pub fn main() {
    let x: AStruct = 42; // causes error, all public names of AStruct are generated?
}
@estebank estebank added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. labels Jan 10, 2019
@hvenev
Copy link
Contributor Author

hvenev commented Jan 11, 2019

The hang can also occur on code that should produce no errors/warnings. However I couldn't find out why.

@jakubadamw
Copy link
Contributor

jakubadamw commented Jul 25, 2020

This seems to be fixed. I verified this in Nightly, 1.45 and 1.44 both with the test case above and using the repro script from #58430 (comment).

@rustbot modify labels to +E-needs-test

@rustbot rustbot added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Jul 25, 2020
@dtolnay dtolnay changed the title Inifinite loop in try_push_visible_item_path Infinite loop in try_push_visible_item_path Jul 25, 2020
@Enselic Enselic marked this as a duplicate of #58430 Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants