-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE with mismatching lifetime generics between trait and impl #16218
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
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
Another variation of this bug: trait Foo<T> { }
trait SerializeState {
fn f<'a, T: Foo<&'a int>>(&self, x: T);
}
struct GatherTokens;
impl SerializeState for GatherTokens {
fn f<T: Foo<int>>(&self, _x: T) { }
}
fn main() { } produces:
|
Looks like it no longer causes an ICE. |
nathantypanski
added a commit
to nathantypanski/rust
that referenced
this issue
Sep 7, 2014
This code used to produce an ICE on the definition of trait Bar with the following message: Type parameter out of range when substituting in region 'a (root type=fn(Self) -> 'astr) (space=FnSpace, index=0) Closes rust-lang#16218.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Example: (Difference is
'a
paramter in thebar
signature)The text was updated successfully, but these errors were encountered: