-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE : ty_is_local invoked on unexpected type: [type error] #29857
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Specifically, this impl seems to cause the ICE. |
Reduced (play): use std::marker::PhantomData;
pub trait Foo<P> {}
impl <P, T: Foo<P>> Foo<P> for Option<T> {}
pub struct Qux<T> (PhantomData<*mut T>);
impl<T> Foo<*mut T> for Option<Qux<T>> {}
pub trait Bar {
type Output: 'static;
}
impl<T: 'static, W: Bar<Output = T>> Foo<*mut T> for W {}
fn main() {} |
I bisected this and the ICE first occurs with commit 9c6d35d Backtrace
|
triage: P-medium |
triage: P-high |
nikomatsakis
added a commit
to nikomatsakis/rust
that referenced
this issue
Jan 9, 2016
bors
added a commit
that referenced
this issue
Jan 11, 2016
This is an alternative to #29954 for fixing #29857 that seems to me to be more inline with the general strategy around `TyError`. It also includes the fix for #30589 -- in fact, just the minimal change of making `ty_is_local` tolerate `TyError` avoids the ICE, but you get a lot of duplicate error reports, so in the case where the impl's trait reference already includes `TyError`, we just ignore the impl altogether. cc @arielb1 @sanxiyn Fixes #29857. Fixes #30589.
Merged fix into beta. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Running the rustc command with
RUST_BACKTRACE=1
results in:The text was updated successfully, but these errors were encountered: