-
Notifications
You must be signed in to change notification settings - Fork 13k
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: FulfillmentError, MismatchedProjectionTypes #33461
Comments
I investigated this further and ended up with the following test case independent from ncollide/nphysics. It causes an ICE on both beta (rustc 1.9.0-beta.2 (87cb733 2016-05-04)) and nigthly (rustc 1.10.0-nightly (8da2bca 2016-04-28))( and compiles fine on stable. The ICE will appear with and without I can try to compile this on master but it will take some time before I can download the repo and compile rustc manually. use std::marker::PhantomData;
struct TheType<T> {
t: PhantomData<T>
}
pub trait TheTrait {
type TheAssociatedType;
}
impl TheTrait for () {
type TheAssociatedType = ();
}
pub trait Shape<P: TheTrait> {
fn doit(&self) {
}
}
impl<P: TheTrait> Shape<P> for TheType<P::TheAssociatedType> {
}
fn main() {
let ball = TheType { t: PhantomData };
let handle: &Shape<()> = &ball;
} This will compile fine, without any ICE if we do at least one of the following:
impl<P: TheTrait> Shape<P> for TheType<P::TheAssociatedType> {
fn doit(&self) {
}
}
|
Fixes rust-lang#33436 and rust-lang#33461. Test case is from rust-lang#33461.
…=eddyb trans: callee: normalize trait_ref before use This fixes rust-lang#33436 and rust-lang#33461. Ran the tests and nothing else seems to be affected. P.S. How to write the regression test for this fix? Does this qualify as run-pass or run-make, as the test only needs to be successfully compiled to be considered passed? Will add the testcase (the minimal example in rust-lang#33461 seems fit) after clarifying this.
trans: callee: normalize trait_ref before use This fixes #33436 and #33461. Ran the tests and nothing else seems to be affected. P.S. How to write the regression test for this fix? Does this qualify as run-pass or run-make, as the test only needs to be successfully compiled to be considered passed? Will add the testcase (the minimal example in #33461 seems fit) after clarifying this.
Fixed by #33478. |
Fixes rust-lang#33436 and rust-lang#33461. Test case is from rust-lang#33461.
Testcase currently relying on the most recent ncollide and nphysics3d from crates.io. When I get some time later today I'll try to reduce it more.
Code:
Error:
The text was updated successfully, but these errors were encountered: