rustgd / rhusics

A cgmath physics library that can be used with Specs
https://docs.rs/rhusics/
Apache License 2.0
106 stars 10 forks source link

Remove lifetime bounds in higher-ranked lifetimes #62

Closed RalfJung closed 6 years ago

RalfJung commented 6 years ago

Those bounds are ignored by the compiler, and will trigger an error once https://github.com/rust-lang/rust/pull/48326 lands. According to crater, this is the only crate using these bounds. This patch should make the crate work on nightly again.

However, I have been unable to compile the crate even with nightly 2018-02-25, which does not include the change mentioned above. So, I couldn't compile-test this PR.


This change is Reviewable

Rhuagh commented 6 years ago

Thanks!

Bors r+

Rhuagh commented 6 years ago

We'll see if it builds on CI :)

bors[bot] commented 6 years ago

Build succeeded

Rhuagh commented 6 years ago

Looks like it works there atleast

RalfJung commented 6 years ago

The build failure was caused by https://github.com/rust-lang/rust/issues/48551. That's fixed, but my branch where I develop https://github.com/rust-lang/rust/pull/48326 does not include the fix yet, so I can't test whether this will keep working when my patch lands. However, these are all the occurrences of higher-ranked lifetime bounds that crater found.

Thanks for merging so quickly. :) Please release a new minor version of the create before the patch hits stable (which will take ~9 weeks).

Rhuagh commented 6 years ago

We will probably release a new major version before that (we have some breaking changes).

RalfJung commented 6 years ago

AFAIK a new minor version with the fix would be necessary for reverse dependencies that will just do cargo update -- they won't get the new major version automatically, so they would fail to build.

Rhuagh commented 6 years ago

True, I'll get that out tonight.

RalfJung commented 6 years ago

I compiled rustc with my patch merged into master, and can confirm that this can build current rhusics master (while it fails on the version without my patch, as expected).

So, looking good :)

Rhuagh commented 6 years ago

The breaking changes had not been merged to master yet, so this was easier than I thought it would :) Anyways, new minors have been released.