-
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: Region parameter out of range when substituting in region... #49362
Comments
Generic associated types aren't implemented past syntax yet, so this is probably expected. cc #44265 |
This does not only happen with generic associated lifetimes but with any generic associated type: #![feature(generic_associated_types)]
pub trait MyTrait {
type InternalType<TypeA>;
}
pub struct GenericType<TypeA> {
_dummy: TypeA,
}
pub struct MyStruct {}
impl MyTrait for MyStruct {
type InternalType<TypeA> = GenericType<TypeA>;
}
// -----------------------------------------------------------------------------
fn main() {}
Rust playground: https://play.rust-lang.org/?gist=c36f51038511f3e6568b1b2c866f2ca3&version=nightly&mode=debug Maybe its worth to disable the feature flag or add a compiler error warning if the flag is used, until the feature implementation progressed further. |
Triage: still happens. |
Slightly reduced, no need for a new
|
Closing in favor of #62521. |
@estebank although they are two different ICE messages?
vs
|
…atsakis Make GATs less ICE-prone. After this PR simple lifetime-generic associated types can now be used in a compiling program. There are two big limitations: * rust-lang#30472 has not been addressed in any way (see src/test/ui/generic-associated-types/iterable.rs) * Using type- and const-generic associated types errors because bound types and constants aren't handled by trait solving. * The errors are technically non-fatal, but they happen in a [part of the compiler](https://github.com/rust-lang/rust/blob/4abb0ad2731e9ac6fd5d64d4cf15b7c82e4b5a81/src/librustc_typeck/lib.rs#L298) that fairly aggressively stops compiling on errors. closes rust-lang#47206 closes rust-lang#49362 closes rust-lang#62521 closes rust-lang#63300 closes rust-lang#64755 closes rust-lang#67089
Rust playground
Probably related: #47309
I can reproduce this with
rustc 1.26.0-nightly (f5631d9ac 2018-03-24)
.The text was updated successfully, but these errors were encountered: