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

Regression in 5 crates in 1.26: the trait bound is not satisfied #49932

Closed
pietroalbini opened this issue Apr 13, 2018 · 16 comments
Closed

Regression in 5 crates in 1.26: the trait bound is not satisfied #49932

pietroalbini opened this issue Apr 13, 2018 · 16 comments
Labels
C-bug Category: This is a bug. 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.
Milestone

Comments

@pietroalbini
Copy link
Member

pietroalbini commented Apr 13, 2018

There are a few crates that are failing to build on Rust 1.26 with the error the trait bound '###' is not satisfied. A lot of those errors seems to be related with !.

@pietroalbini pietroalbini added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. C-bug Category: This is a bug. labels Apr 13, 2018
@pietroalbini pietroalbini added this to the 1.26 milestone Apr 13, 2018
@mackwic
Copy link
Contributor

mackwic commented Apr 13, 2018

thanks for the notification @pietroalbini ! Can I have the error log for rspec ?

@pietroalbini
Copy link
Member Author

pietroalbini commented Apr 13, 2018

Woops! Forgot to add the link for that crate. Thanks for pointing that out! rspec report

@mackwic
Copy link
Contributor

mackwic commented Apr 13, 2018

What is even ! ? I don't understand this error 😕

@pietroalbini
Copy link
Member Author

What is even ! ? I don't understand this error 😕

The ! type is the "never" type, specified in RFC 1216 and stabilized in 1.26. It basically means "this return value is unreachable". In your case, that's the value returned by panic!.

@Mark-Simulacrum
Copy link
Member

Errors related to ! might not be worth fixing just yet as I believe we're planning to revert that stabilization.

@acmcarther
Copy link

cucumber crate author here:

I wasn't able to replicate this from what I gleamed in the linked logs:

$ git clone git@github.com:acmcarther/cucumber && cd cucumber
$ rustup toolchain install beta-2018-04-06-x86_64-unknown-linux-gnu 
$ rustup default beta-2018-04-06-x86_64-unknown-linux-gnu
$ CARGO_INCREMENTAL=0 RUST_BACKTRACE=full RUSTFLAGS=--cap-lints=warn cargo test --no-run --frozen
# Build succeeds

Absent an actual reproduction though, I suspect dropping return from my return panic will probably resolve the issue in my crate.

@hawkw
Copy link
Contributor

hawkw commented Apr 13, 2018

We're also seeing this when buillding h2 against nightly: hyperium/h2#257.

@pietroalbini
Copy link
Member Author

This will be fixed after #50121 (reverting the stabilization) is merged and backported into beta.

@pietroalbini
Copy link
Member Author

The stabilization of ! is now reverted both on beta and nightly. Sorry for the trouble!

@pietroalbini
Copy link
Member Author

pietroalbini commented May 1, 2018

A lot of those errors seems to be related with !.

Well, apparently not all of the errors in this issue were related to the never type. plexus 0.0.1 (not the latest version) is still failing on the latest beta (with the stabilization rollback backported):

 error[E0277]: the trait bound `u64: graph::geometry::Geometry` is not satisfied
   --> /.../plexus-0.0.1/src/graph/mesh.rs:90:1
    |
 90 | / pub struct Mesh<G = u64>
 91 | | where
 92 | |     G: Geometry,
 93 | | {
 ...  |
 96 | |     pub(super) faces: Storage<FaceKey, Face<G::Face>>,
 97 | | }
    | |_^ the trait `graph::geometry::Geometry` is not implemented for `u64`
    |
 note: required by `graph::geometry::Geometry`
   --> /.../plexus-0.0.1/src/graph/geometry/mod.rs:8:1
    |
 8  | pub trait Geometry: Sized {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^

Build log

@pietroalbini pietroalbini reopened this May 1, 2018
@pietroalbini
Copy link
Member Author

Bisected the plexus thing, the regression is caused by #46785, cc @leodasvacas @nikomatsakis

@leoyvens
Copy link
Contributor

leoyvens commented May 1, 2018

That's intended, G can never be u64 making the default unusable so we error. Given that crater was clean at the time of the change and that plexus, the only known affected crate, is only affected on a very old version I see no reason to revert or alleviate the change. Thanks for the bisect and ping!

@nikomatsakis
Copy link
Contributor

That version of plexus seems to have no dependencies:

https://crates.io/crates/plexus/reverse_dependencies

There is a dependency on 0.0.1 from the bismuth crate -- cc @olson-sean-k, you may want to update to a newer version of plexus. =)

@pietroalbini
Copy link
Member Author

Ok, I'll close this issue back.

@olson-sean-k
Copy link

Thanks for the ping! Sorry I've been absent from the discussion.

There is a dependency on 0.0.1 from the bismuth crate ... you may want to update to a newer version of plexus. =)

Yep, bismuth fails to build here because it depends on plexus at 0.0.1 and exhibits that error. I'll go ahead and publish a new version of bismuth to pull in updated dependencies. :-)

@nikomatsakis
Copy link
Contributor

@olson-sean-k <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. 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.
Projects
None yet
Development

No branches or pull requests

8 participants