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

Locally pub but inaccessible items w/o stability attributes can cause an ICE #38857

Closed
pnkfelix opened this issue Jan 5, 2017 · 1 comment
Closed
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Jan 5, 2017

Spawned off of #38689

There are still some cases where referencing an inaccessible item can cause the compiler to ICE.

Here is one crafted example (playpen)

fn main() {
    let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
}

but if std's module structure is revised then that example may fail to compile without ICE'ing for other reasons, so take care in understanding the issue: the change introduced by #38689 is skipping the requirement for stability attributes is slightly too narrow, in that it uses a local notion of pub/non-pub instead of overall accessibility.

One simple solution to this may be to just follow the suggestion here #38689 (comment) and just remove the assertion entirely. (I did not want to adopt that solution for a PR to be backported to beta, but I think it is worth considering doing in nightly alone to resolve this low priority issue.)

@petrochenkov
Copy link
Contributor

Keywords: for better search

error: internal compiler error: src/librustc/middle/stability.rs:547: encountered unmarked API

@frewsxcv frewsxcv added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jun 4, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 22, 2017
topecongiro added a commit to topecongiro/rust that referenced this issue Dec 30, 2017
bors added a commit that referenced this issue Dec 31, 2017
Add tests on fixed ICEs

Closes #29924. Closes #38857. Closes #39665. Closes #39872.
Closes #41210. Closes #41880. Closes #43483.

Note that compile-fail/E0599.rs is for #41210.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants