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

Build fails on latest rustc nightly #152

Closed
zslayton opened this issue Apr 18, 2015 · 2 comments
Closed

Build fails on latest rustc nightly #152

zslayton opened this issue Apr 18, 2015 · 2 comments

Comments

@zslayton
Copy link
Contributor

This has the same root cause as nix-rust/nix#103. I tried changing the offending lifetime in nix-rust to 'static in my environment just to get working again and a similar problem cropped up in mio:

   Compiling mio v0.3.2 (https://github.com/carllerche/mio#c66d1cec)
/home/zslayton/.cargo/git/checkouts/mio-8730c946209c11b6/master/src/util/slab.rs:270:10: 270:12 error: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates [E0207]
/home/zslayton/.cargo/git/checkouts/mio-8730c946209c11b6/master/src/util/slab.rs:270 impl<'a, 'b, T> Iterator for SlabMutIter<'a, T> {
                                                                                              ^~
error: aborting due to previous error
Could not compile `mio`.

@fhartwig
Copy link
Contributor

In this case, the compiler found an actual problem, as the current lifetimes are really unsafe (I've just managed to get a &'static reference out of SlabMutIter, which clearly shouldn't be possible).

If you want mio to build, you can get a working version from my repo at https://github.com/fhartwig/mio/tree/rustup (or you could just remove the slab iterator stuff if you're not using it). I'm not making a pull request yet because a proper fix will involve bumping the nix version bound (and I haven't gotten around to fixing the tests yet).

@carllerche
Copy link
Member

This should be fixed on master.

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

3 participants