-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: control flow ensures we have a BindingObligation
or WhereClauseInExpr
here
#130012
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
dtolnay
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
labels
Sep 6, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 6, 2024
@rustbot claim |
This did not used to ICE prior to #124988. The PR is in nightly-2024-05-12 and Rust 1.80. The diagnostic from nightly-2024-05-11 before that PR is: error[E0582]: binding for associated type `Assoc` references lifetime `'v`, which does not appear in the trait input types
--> src/lib.rs:5:26
|
5 | trait Trait: for<'v> Fun<Assoc = &'v ()> {}
| ^^^^^^^^^^^^^^
error[E0582]: binding for associated type `Assoc` references lifetime `'v`, which does not appear in the trait input types
--> src/lib.rs:7:21
|
7 | impl<F: for<'v> Fun<Assoc = &'v ()>> Trait for F {}
| ^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/lib.rs:7:48
|
7 | impl<F: for<'v> Fun<Assoc = &'v ()>> Trait for F {}
| ^ one type is more general than the other
|
= note: expected reference `&()`
found reference `&'v ()` |
dtolnay
added
the
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
label
Sep 7, 2024
rustbot
added
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Sep 7, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Sep 9, 2024
Fix ICE caused by missing span in a region error Fixes rust-lang#130012 The ICE occurs on line 634 in this error handling code: https://github.com/rust-lang/rust/blob/085744b7ad8b227239bcee0a44cd78dcd0310ab9/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs#L617-L637 It is caused by the span being a dummy span and `!span.is_dummy()` on line 628 evaluating to `false`. A dummy span, however, is expected here thanks to the `Self: Trait` predicate from `predicates_of` (see line 61): https://github.com/rust-lang/rust/blob/085744b7ad8b227239bcee0a44cd78dcd0310ab9/compiler/rustc_hir_analysis/src/collect/predicates_of.rs#L61-L69 This PR changes the error handling code to omit the note which needed the span instead of ICE'ing in the presence of a dummy span.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 9, 2024
Rollup merge of rust-lang#130137 - gurry:master, r=cjgillot Fix ICE caused by missing span in a region error Fixes rust-lang#130012 The ICE occurs on line 634 in this error handling code: https://github.com/rust-lang/rust/blob/085744b7ad8b227239bcee0a44cd78dcd0310ab9/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs#L617-L637 It is caused by the span being a dummy span and `!span.is_dummy()` on line 628 evaluating to `false`. A dummy span, however, is expected here thanks to the `Self: Trait` predicate from `predicates_of` (see line 61): https://github.com/rust-lang/rust/blob/085744b7ad8b227239bcee0a44cd78dcd0310ab9/compiler/rustc_hir_analysis/src/collect/predicates_of.rs#L61-L69 This PR changes the error handling code to omit the note which needed the span instead of ICE'ing in the presence of a dummy span.
apiraino
removed
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Sep 10, 2024
saethlin
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 10, 2024
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) ❄️
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
: current nightlyError output
rustc main.rs
Backtrace
The text was updated successfully, but these errors were encountered: