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

Created on 13 Apr 2018  路  16Comments  路  Source: rust-lang/rust

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 !.

C-bug I-nominated T-compiler regression-from-stable-to-beta

Most helpful comment

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

All 16 comments

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

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

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

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

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!.

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

cucumber crate author here:

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

$ git clone [email protected]: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.

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

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

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

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

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

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!

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. =)

Ok, I'll close this issue back.

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. :-)

@olson-sean-k <3

Was this page helpful?
0 / 5 - 0 ratings