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

Where-clause based exclusion of default methods from vtable doesn't normalize correctly. #26805

Closed
eddyb opened this issue Jul 5, 2015 · 1 comment

Comments

@eddyb
Copy link
Member

eddyb commented Jul 5, 2015

@Ms2ger reported that on rustc-1.3.0-dev (f3b97a7), https://github.com/mlalic/solicit ICEs with:

src/libcore/iter.rs:804:35: 804:42 error: internal compiler error: Encountered errors
`[FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<http::session::DefaultStream as core::cmp::PartialOrd>)),depth=1),Unimplemented)]`
fulfilling during trans

This turned out to occur due to the instantiation of Iterator::min's default body for a vtable, while Self::Item doesn't implement Ord.
#26677 left two uses of infer::new_infer_ctxt in trans, where only infer::normalizing_infer_ctxt should be used.

Shorter testcase:

struct NonOrd;
fn main() {
    let _: Box<Iterator<Item = _>> = Box::new(vec![NonOrd].into_iter());
}
src/libcore/iter.rs:804:35: 804:42 error: internal compiler error: Encountered error
`Unimplemented` selecting `Binder(<NonOrd as core::cmp::PartialOrd>)`
during trans
@eddyb
Copy link
Member Author

eddyb commented Jul 5, 2015

cc @jroesch I'll try to get a fix ready, could you confirm that not using infer::normalizing_infer_ctxt was accidental?

Ms2ger added a commit to servo/servo that referenced this issue Jul 6, 2015
This excludes

* layers, as its latest commits have an API change we still need to adapt to;
* hyper, as it gained a dependency on the solicit crate, which triggers an ICE
  in the current rustc (<rust-lang/rust#26805>);
* websocket, as it depends on a hyper API change;
* tenacious, as it has not yet been updated to the current rustc
  (<Manishearth/rust-tenacious#6>).
Ms2ger added a commit to servo/servo that referenced this issue Jul 6, 2015
This excludes

* layers, as its latest commits have an API change we still need to adapt to;
* hyper, as it gained a dependency on the solicit crate, which triggers an ICE
  in the current rustc (<rust-lang/rust#26805>);
* websocket, as it depends on a hyper API change;
* tenacious, as it has not yet been updated to the current rustc
  (<Manishearth/rust-tenacious#6>).

Unfortunately, this adds a third copy of bitflags to our dependencies; I've
created pull requests to the guilty dependencies:
<sfackler/rust-openssl#236> and
<servo/cocoa-rs#94>.
bors-servo pushed a commit to servo/servo that referenced this issue Jul 6, 2015
Update most dependencies.

This excludes

* layers, as its latest commits have an API change we still need to adapt to;
* hyper, as it gained a dependency on the solicit crate, which triggers an ICE
  in the current rustc (<rust-lang/rust#26805>);
* websocket, as it depends on a hyper API change;
* tenacious, as it has not yet been updated to the current rustc
  (<Manishearth/rust-tenacious#6>).

Unfortunately, this adds a third copy of bitflags to our dependencies; I've
created pull requests to the guilty dependencies:
<sfackler/rust-openssl#236> and
<servo/cocoa-rs#94>.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6562)
<!-- Reviewable:end -->
Ms2ger added a commit to servo/servo that referenced this issue Jul 6, 2015
This excludes

* layers, as its latest commits have an API change we still need to adapt to;
* hyper, as it gained a dependency on the solicit crate, which triggers an ICE
  in the current rustc (<rust-lang/rust#26805>);
* websocket, as it depends on a hyper API change;
* tenacious, as it has not yet been updated to the current rustc
  (<Manishearth/rust-tenacious#6>).

Unfortunately, this adds a third copy of bitflags to our dependencies; I've
created pull requests to the guilty dependencies:
<sfackler/rust-openssl#236> and
<servo/cocoa-rs#94>.
bors-servo pushed a commit to servo/servo that referenced this issue Jul 6, 2015
Update most dependencies.

This excludes

* layers, as its latest commits have an API change we still need to adapt to;
* hyper, as it gained a dependency on the solicit crate, which triggers an ICE
  in the current rustc (<rust-lang/rust#26805>);
* websocket, as it depends on a hyper API change;
* tenacious, as it has not yet been updated to the current rustc
  (<Manishearth/rust-tenacious#6>).

Unfortunately, this adds a third copy of bitflags to our dependencies; I've
created pull requests to the guilty dependencies:
<sfackler/rust-openssl#236> and
<servo/cocoa-rs#94>.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6562)
<!-- Reviewable:end -->
steveklabnik added a commit to steveklabnik/rust that referenced this issue Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant