Skip to content
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 with generic associated types #62326

Closed
Patryk27 opened this issue Jul 3, 2019 · 2 comments
Closed

ICE with generic associated types #62326

Patryk27 opened this issue Jul 3, 2019 · 2 comments
Labels
A-associated-items Area: Associated items (types, constants & functions) A-GATs Area: Generic associated types (GATs) A-lifetimes Area: Lifetimes / regions C-bug Category: This is a bug. F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs 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.

Comments

@Patryk27
Copy link
Contributor

Patryk27 commented Jul 3, 2019

Hi,

Following code:

#![feature(generic_associated_types)]

trait Iterator {
    type Item<'a>: 'a;
}

... fails with:

error: internal compiler error: Region parameter out of range when substituting in region 'a (root type=None) (index=1)

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:362:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.37.0-nightly (b25ee6449 2019-06-17) running on x86_64-unknown-linux-gnu

note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `playground`.

To learn more, run the command again with --verbose.

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=ba801a17c109844b79633bb40919c4fc

@hellow554
Copy link
Contributor

Good catch. Without the feature gate it does not crash on beta or nightly, but only on stable. With feature gate it does crash on all three versions.

@rustbot modify labels: C-bug T-compiler I-ICE A-associated-items

@rustbot rustbot added A-associated-items Area: Associated items (types, constants & functions) C-bug Category: This is a bug. 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. labels Jul 3, 2019
@estebank estebank added the A-lifetimes Area: Lifetimes / regions label Jul 3, 2019
@pnkfelix
Copy link
Member

pnkfelix commented Jul 9, 2019

(closing as duplicate of issue #62521, as it has a more informative title. I did consider trying to reuse this ticket as the main representative instead, but at this point closing this as duplicate is cleaner overall in terms of conveying the metabug-like nature of #62521.)

@pnkfelix pnkfelix closed this as completed Jul 9, 2019
@Centril Centril added the F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs label Aug 5, 2019
@fmease fmease added the A-GATs Area: Generic associated types (GATs) label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-associated-items Area: Associated items (types, constants & functions) A-GATs Area: Generic associated types (GATs) A-lifetimes Area: Lifetimes / regions C-bug Category: This is a bug. F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs 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.
Projects
None yet
Development

No branches or pull requests

7 participants