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

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

Closed
mkroening opened this issue Nov 6, 2023 · 1 comment
Closed

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

mkroening opened this issue Nov 6, 2023 · 1 comment

Comments

@mkroening
Copy link

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)
@mkroening
Copy link
Author

Closed in #328.

nuke-web3 added a commit to paritytech/polkadot-sdk that referenced this issue Jan 10, 2024
- Fix docs deps build issue
(servo/rust-smallvec#327) (Please forgive me
and LMK if there are processes I need to follow for the bump a dep here
I am not aware of).
- Fix links for `meta_contributing` docs, internal and external.
- `cargo +nightly fmt` for `/docs/...` files
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

1 participant