Skip to content

Fails to build with minimal versions #556

@konstin

Description

@konstin

In pubgrub, we're using ron = "=0.9.0-alpha.0". I can't build pubgrub with

cargo +nightly check -Zminimal-versions

due to ron not being compatible with the lowest versions it declares:

error[E0277]: the trait bound `usize: Bits` is not satisfied
 --> /home/konsti/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ron-0.9.0-alpha.0/src/extensions.rs:6:28
  |
6 |     pub struct Extensions: usize {
  |                            ^^^^^ the trait `Bits` is not implemented for `usize`
  |
  = help: the following other types implement trait `Bits`:
            i128
            i16
            i32
            i64
            i8
            u128
            u16
            u32
          and 2 others
note: required by a bound in `bitflags::BitFlags::Bits`
 --> /home/konsti/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bitflags-2.0.0/src/traits.rs:8:16
  |
8 |     type Bits: Bits;
  |                ^^^^ required by this bound in `BitFlags::Bits`

error[E0277]: the trait bound `usize: Bits` is not satisfied
 --> /home/konsti/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ron-0.9.0-alpha.0/src/extensions.rs:6:28
  |
6 |     pub struct Extensions: usize {
  |                            ^^^^^ the trait `Bits` is not implemented for `usize`
  |
  = help: the following other types implement trait `Bits`:
            i128
            i16
            i32
            i64
            i8
            u128
            u16
            u32
          and 2 others

Building ron itself with -Zminimal-versions, there a bigger number of build errors:

rm Cargo.lock && cargo +nightly check -Zminimal-versions

Output: https://gist.github.com/konstin/c4a9cd2ad9170e1ae3e476f5946db5ee

Would it be possible to tighten the lower bounds so that downstream crates can test with minimal versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions