-
Notifications
You must be signed in to change notification settings - Fork 13.3k
lookup_item ICE when &'self fn deref'ed from separate compile unit #6919
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I spent some time debugging this and apparently if you mark |
The problem seems to be that there is no code in place to check that private functions are not "leaked" with the use of iss.rc #[link(name="iss6919_4", vers="0.1")];
fn no_op() { }
pub static k: extern "Rust" fn() = no_op; main.rs extern mod iss ( name = "iss6919_4" );
fn main() {
iss::k;
} |
Ok, I think I know more or less what to do to find such private-but-leaked functions and how to export them. But the problem is: that probably makes them visible from outside the crate, which is probably not desirable. What now? |
The following commit fixes the ICE, but also exports all private functions that are referenced using visible |
Hmm this commit also exports lots of other stuff it shouldn't... Sorry for the spam |
There is no longer an ICE with the reduced or original testcase. Needs test in testsuite. |
Spawned off of #5446. (This is a significantly narrowed down version of the test case described there; the problem with conditions appears to arise from its use of
'self
region parameters for borrowed function pointers.)(This top version is newer and thus labelled as a variant. The "original narrowing" is at the bottom of the report.)
iss.rc (variant 3):
main.rs (variant 3):
Transcript:
Original narrowed version below (but one above is smaller).
iss.rc:
main.rs:
Transcript:
The text was updated successfully, but these errors were encountered: