-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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: None in compiler/rustc_borrowck/src/region_infer/opaque_types.rs #137015
Labels
A-borrow-checker
Area: The borrow checker
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-bisection
Status: a bisection has been found for this issue
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
bisects to #136559 |
simpler: trait AnotherTrait {
type Ty2<'a>;
}
fn test_alias<T: AnotherTrait>(_: &'static T::Ty2<'_>) {
let _: &'static T::Ty2<'_>;
} |
//@ compile-flags: --edition=2024
fn opaque<'a: 'a>() -> impl Sized {}
fn assert_static<T: 'static>(_: T) {}
fn test_closure() {
let closure = |_| {
assert_static(opaque());
};
closure(&opaque());
}
pub fn main() {} also gives a
on top, and goes from compile -> ice with |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 16, 2025
…li-obk Rework `name_regions` to not rely on reverse scc graph for non-member-constrain usages Fixes rust-lang#137015 Splits the `name_regions` into two versions: One meant for member region constraint error reporting (which I've renamed to `name_regions_for_member_constraint`), and one meant *just* to replace region vids with an external region. Use the latter in the usage sites I added in rust-lang#136559, since the regions returned by `name_regions_for_member_constraint` are also not *totally* accurate (which is fine for how they're used for member region constraint error reporting -- they're intentionally returning overapproximated universal regions so that we have something to name in `+ use<'a>` suggestions, because opaques can only capture universal regions and since member region constraints don't insert any edges into the region graph, the error region is probably gonna be shorter than a universal region) and because that function requires the reverse scc graph to have been computed which isn't done for our usages in rust-lang#136559.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Feb 16, 2025
…li-obk Rework `name_regions` to not rely on reverse scc graph for non-member-constrain usages Fixes rust-lang#137015 Splits the `name_regions` into two versions: One meant for member region constraint error reporting (which I've renamed to `name_regions_for_member_constraint`), and one meant *just* to replace region vids with an external region. Use the latter in the usage sites I added in rust-lang#136559, since the regions returned by `name_regions_for_member_constraint` are also not *totally* accurate (which is fine for how they're used for member region constraint error reporting -- they're intentionally returning overapproximated universal regions so that we have something to name in `+ use<'a>` suggestions, because opaques can only capture universal regions and since member region constraints don't insert any edges into the region graph, the error region is probably gonna be shorter than a universal region) and because that function requires the reverse scc graph to have been computed which isn't done for our usages in rust-lang#136559.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 17, 2025
Rollup merge of rust-lang#137102 - compiler-errors:name_regions2, r=oli-obk Rework `name_regions` to not rely on reverse scc graph for non-member-constrain usages Fixes rust-lang#137015 Splits the `name_regions` into two versions: One meant for member region constraint error reporting (which I've renamed to `name_regions_for_member_constraint`), and one meant *just* to replace region vids with an external region. Use the latter in the usage sites I added in rust-lang#136559, since the regions returned by `name_regions_for_member_constraint` are also not *totally* accurate (which is fine for how they're used for member region constraint error reporting -- they're intentionally returning overapproximated universal regions so that we have something to name in `+ use<'a>` suggestions, because opaques can only capture universal regions and since member region constraints don't insert any edges into the region graph, the error region is probably gonna be shorter than a universal region) and because that function requires the reverse scc graph to have been computed which isn't done for our usages in rust-lang#136559.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this issue
Feb 17, 2025
Rework `name_regions` to not rely on reverse scc graph for non-member-constrain usages Fixes rust-lang/rust#137015 Splits the `name_regions` into two versions: One meant for member region constraint error reporting (which I've renamed to `name_regions_for_member_constraint`), and one meant *just* to replace region vids with an external region. Use the latter in the usage sites I added in #136559, since the regions returned by `name_regions_for_member_constraint` are also not *totally* accurate (which is fine for how they're used for member region constraint error reporting -- they're intentionally returning overapproximated universal regions so that we have something to name in `+ use<'a>` suggestions, because opaques can only capture universal regions and since member region constraints don't insert any edges into the region graph, the error region is probably gonna be shorter than a universal region) and because that function requires the reverse scc graph to have been computed which isn't done for our usages in #136559.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-borrow-checker
Area: The borrow checker
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-bisection
Status: a bisection has been found for this issue
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original code
original:
Version information
Possibly related line of code:
rust/compiler/rustc_borrowck/src/region_infer/opaque_types.rs
Lines 236 to 248 in 6dfeab5
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: