-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[ICE]: incremental compilation error with lints_that_dont_need_to_run after enabling -Zpublic-dependency #156182
Copy link
Copy link
Open
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.F-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️L-exported_private_dependenciesLint: exported_private_dependenciesLint: exported_private_dependenciesS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Metadata
Metadata
Assignees
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.F-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️L-exported_private_dependenciesLint: exported_private_dependenciesLint: exported_private_dependenciesS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
This reproduces with a small Cargo project containing a private path dependency.
Cargo.toml:src/lib.rs:dep/Cargo.toml:dep/src/lib.rs:Reproduction steps:
The first build populates the incremental cache without
-Zpublic-dependency.The second build recompiles the root library with
-Zpublic-dependency, which enables theexported_private_dependencieswarning for the private dependency in the public API.This does not ICE for me when:
-Zpublic-dependency, orCARGO_INCREMENTAL=0.I originally noticed this while investigating rust-lang/cargo#16962, but this ICE is separate from Cargo's stale-cache behavior. The minimized repro above does not need an intermediate stale Cargo run; touching
src/lib.rsis enough to force the root library to rebuild with the changed-Zpublic-dependencystate.Meta
rustc +nightly --version --verbose:cargo +nightly -Vv:Error output
Backtrace