-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Cycle detected when computing whether impls specialize one another, across crate boundaries #90817
Copy link
Copy link
Closed
Labels
A-specializationArea: Trait impl specializationArea: Trait impl specializationA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedP-lowLow priorityLow priorityT-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-specializationArea: Trait impl specializationArea: Trait impl specializationA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedP-lowLow priorityLow priorityT-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
I tried this code (note: the crate name is
bug, and this only occurs when the files are separate):In
src/lib.rs:In
src/main.rs:I expected to see this happen: Code compiles successfully, as it would if everything was in
main.rs.Instead, this happened: the compiler emits an error:
Meta
rustc --version --verbose:This also appears to be present on 1.58.0-nightly 2021-11-10, commit hash 82af160.