Skip to content

v1: cargo doc fails on nightly with feature = "const_generics" #327

@mkroening

Description

@mkroening

Running the following on the v1 branch fails:

$ cargo +nightly doc --features const_new
 Documenting smallvec v1.11.1 (/Users/mkroening/devel/rust-smallvec)
error[E0277]: the trait bound `[T; N]: Array` is not satisfied
   --> src/lib.rs:684:25
    |
684 | impl<T, const N: usize> SmallVecData<[T; N]> {
    |                         ^^^^^^^^^^^^^^^^^^^^ the trait `Array` is not implemented for `[T; N]`
    |
    = help: the following other types implement trait `Array`:
              [T; 0]
              [T; 1]
              [T; 2]
              [T; 3]
              [T; 4]
              [T; 5]
              [T; 6]
              [T; 7]
            and 45 others
note: required by a bound in `SmallVecData`
   --> src/lib.rs:670:22
    |
670 | enum SmallVecData<A: Array> {
    |                      ^^^^^ required by this bound in `SmallVecData`

error[E0277]: the trait bound `[T; N]: Array` is not satisfied
    --> src/lib.rs:2363:25
     |
2363 | impl<T, const N: usize> SmallVec<[T; N]> {
     |                         ^^^^^^^^^^^^^^^^ the trait `Array` is not implemented for `[T; N]`
     |
     = help: the following other types implement trait `Array`:
               [T; 0]
               [T; 1]
               [T; 2]
               [T; 3]
               [T; 4]
               [T; 5]
               [T; 6]
               [T; 7]
             and 45 others
note: required by a bound in `SmallVec`
    --> src/lib.rs:768:24
     |
768  | pub struct SmallVec<A: Array> {
     |                        ^^^^^ required by this bound in `SmallVec`

error[E0277]: the trait bound `[T; N]: Array` is not satisfied
   --> src/lib.rs:687:57
    |
687 |     const fn from_const(inline: MaybeUninit<[T; N]>) -> Self {
    |                                                         ^^^^ the trait `Array` is not implemented for `[T; N]`
    |
    = help: the following other types implement trait `Array`:
              [T; 0]
              [T; 1]
              [T; 2]
              [T; 3]
              [T; 4]
              [T; 5]
              [T; 6]
              [T; 7]
            and 45 others
note: required by a bound in `SmallVecData`
   --> src/lib.rs:670:22
    |
670 | enum SmallVecData<A: Array> {
    |                      ^^^^^ required by this bound in `SmallVecData`

error[E0277]: the trait bound `[T; N]: Array` is not satisfied
    --> src/lib.rs:2369:33
     |
2369 |     pub const fn new_const() -> Self {
     |                                 ^^^^ the trait `Array` is not implemented for `[T; N]`
     |
     = help: the following other types implement trait `Array`:
               [T; 0]
               [T; 1]
               [T; 2]
               [T; 3]
               [T; 4]
               [T; 5]
               [T; 6]
               [T; 7]
             and 45 others
note: required by a bound in `SmallVec`
    --> src/lib.rs:768:24
     |
768  | pub struct SmallVec<A: Array> {
     |                        ^^^^^ required by this bound in `SmallVec`

error[E0277]: the trait bound `[T; N]: Array` is not satisfied
    --> src/lib.rs:2381:47
     |
2381 |     pub const fn from_const(items: [T; N]) -> Self {
     |                                               ^^^^ the trait `Array` is not implemented for `[T; N]`
     |
     = help: the following other types implement trait `Array`:
               [T; 0]
               [T; 1]
               [T; 2]
               [T; 3]
               [T; 4]
               [T; 5]
               [T; 6]
               [T; 7]
             and 45 others
note: required by a bound in `SmallVec`
    --> src/lib.rs:768:24
     |
768  | pub struct SmallVec<A: Array> {
     |                        ^^^^^ required by this bound in `SmallVec`

For more information about this error, try `rustc --explain E0277`.
error: could not document `smallvec`

Caused by:
  process didn't exit successfully: `/Users/mkroening/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustdoc --edition=2018 --crate-type lib --crate-name smallvec src/lib.rs -o /Users/mkroening/devel/rust-smallvec/target/doc --cfg 'feature="const_generics"' --cfg 'feature="const_new"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=215 -C metadata=8a4990e67e4d35ec -L dependency=/Users/mkroening/devel/rust-smallvec/target/debug/deps --crate-version 1.11.1` (exit status: 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions