-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE: Use a type that has already been pub used. #45876
Comments
I was unable to reproduce the ICE from any of the 10 most recent commits of that repository (starting at 41e849b3fea70753e12a2e04444c80593fb49837). I attempted on macOS with Rust 1.21.0.
|
@shepmaster None of the 10 commits you used can be used to reproduce the issue. I can use this commit to reproduce the issue on 2 of my machines. |
Yep, I can confirm I see the ICE now. |
Here is a reduced testcase: mod item {
mod visibility {
pub struct Visibility;
}
pub use self::visibility::*;
use Visibility;
struct Item(Visibility);
impl Item {
fn get_nodes(&self) {
self.0;
}
}
}
pub use self::item::*;
fn main() {}
I see this fail on:
|
It appears to me that
I'd guess the problem lies therein |
Summary:
The compilation of my source panics. I believe this happens because I
use
astruct
that has already beenpub use
d. You may be able to reproduce the issue using this github commit from my repository.I tried this code:
The following source is inside the file:
src\syntactic_analysis\nodes\item\mod.rs
These are the complete file contents.
Modifying the file to the following snippet resolves the issue:
(Only one line has been modified)
I expected to see this happen:
A compilation result.
Instead, this happened:
Meta
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: