Skip to content

"overflow evaluating the requirement" documenting synstructures in rustdoc beta, but not rustdoc stable nor rustc beta #62573

Closed
@daboross

Description

@daboross
Contributor

I'm in a project which depends on both syn and synstructures crates. Using rustc 1.37.0-beta.2 or rustc 1.38.0-nightly (78ca1bda3 2019-07-08), I can no longer document this crate with its dependencies.

The following error occurs:

$ cargo doc 
  Downloaded synstructure v0.11.0
 Documenting synstructure v0.11.0
    Checking synstructure v0.11.0
error[E0275]: overflow evaluating the requirement `alloc::raw_vec::RawVec<(syn::Lifetime, syn::token::Add)>: std::marker::Unpin`
  |
  = help: consider adding a `#![recursion_limit="128"]` attribute to your crate
  = note: required because it appears within the type `std::vec::Vec<(syn::Lifetime, syn::token::Add)>`
  = note: required because it appears within the type `syn::punctuated::Punctuated<syn::Lifetime, syn::token::Add>`
  = note: required because it appears within the type `syn::LifetimeDef`
  = note: required because it appears within the type `(syn::LifetimeDef, syn::token::Comma)`
  = note: required because it appears within the type `*const (syn::LifetimeDef, syn::token::Comma)`
  = note: required because it appears within the type `std::ptr::Unique<(syn::LifetimeDef, syn::token::Comma)>`
  = note: required because it appears within the type `alloc::raw_vec::RawVec<(syn::LifetimeDef, syn::token::Comma)>`
  = note: required because it appears within the type `std::vec::Vec<(syn::LifetimeDef, syn::token::Comma)>`
  = note: required because it appears within the type `syn::punctuated::Punctuated<syn::LifetimeDef, syn::token::Comma>`
  = note: required because it appears within the type `syn::BoundLifetimes`
  = note: required because it appears within the type `std::option::Option<syn::BoundLifetimes>`
  = note: required because it appears within the type `syn::PredicateType`
  = note: required because it appears within the type `syn::WherePredicate`
  = note: required because it appears within the type `(syn::WherePredicate, syn::token::Comma)`
  = note: required because it appears within the type `*const (syn::WherePredicate, syn::token::Comma)`
  = note: required because it appears within the type `std::ptr::Unique<(syn::WherePredicate, syn::token::Comma)>`
  = note: required because it appears within the type `alloc::raw_vec::RawVec<(syn::WherePredicate, syn::token::Comma)>`
  = note: required because it appears within the type `std::vec::Vec<(syn::WherePredicate, syn::token::Comma)>`
  = note: required because it appears within the type `syn::punctuated::Punctuated<syn::WherePredicate, syn::token::Comma>`
  = note: required because it appears within the type `syn::WhereClause`
  = note: required because it appears within the type `std::option::Option<syn::WhereClause>`
  = note: required because it appears within the type `syn::Generics`
  = note: required because it appears within the type `syn::ItemType`
  = note: required because it appears within the type `syn::Item`
  = note: required because it appears within the type `syn::Stmt`
  = note: required because it appears within the type `*const syn::Stmt`
  = note: required because it appears within the type `std::ptr::Unique<syn::Stmt>`
  = note: required because it appears within the type `alloc::raw_vec::RawVec<syn::Stmt>`
  = note: required because it appears within the type `std::vec::Vec<syn::Stmt>`
  = note: required because it appears within the type `syn::Block`
  = note: required because it appears within the type `syn::ExprIf`
  = note: required because it appears within the type `syn::Expr`
  = note: required because it appears within the type `syn::TypeArray`
  = note: required because it appears within the type `syn::Type`
  = note: required because it appears within the type `syn::GenericArgument`
  = note: required because it appears within the type `(syn::GenericArgument, syn::token::Comma)`
  = note: required because it appears within the type `*const (syn::GenericArgument, syn::token::Comma)`
  = note: required because it appears within the type `std::ptr::Unique<(syn::GenericArgument, syn::token::Comma)>`
  = note: required because it appears within the type `alloc::raw_vec::RawVec<(syn::GenericArgument, syn::token::Comma)>`
  = note: required because it appears within the type `std::vec::Vec<(syn::GenericArgument, syn::token::Comma)>`
  = note: required because it appears within the type `syn::punctuated::Punctuated<syn::GenericArgument, syn::token::Comma>`
  = note: required because it appears within the type `syn::AngleBracketedGenericArguments`
  = note: required because it appears within the type `syn::PathArguments`
  = note: required because it appears within the type `syn::PathSegment`
  = note: required because it appears within the type `(syn::PathSegment, syn::token::Colon2)`
  = note: required because it appears within the type `*const (syn::PathSegment, syn::token::Colon2)`
  = note: required because it appears within the type `std::ptr::Unique<(syn::PathSegment, syn::token::Colon2)>`
  = note: required because it appears within the type `alloc::raw_vec::RawVec<(syn::PathSegment, syn::token::Colon2)>`
  = note: required because it appears within the type `std::vec::Vec<(syn::PathSegment, syn::token::Colon2)>`
  = note: required because it appears within the type `syn::punctuated::Punctuated<syn::PathSegment, syn::token::Colon2>`
  = note: required because it appears within the type `syn::Path`
  = note: required because it appears within the type `syn::Attribute`
  = note: required because it appears within the type `*const syn::Attribute`
  = note: required because it appears within the type `std::ptr::Unique<syn::Attribute>`
  = note: required because it appears within the type `alloc::raw_vec::RawVec<syn::Attribute>`
  = note: required because it appears within the type `std::vec::Vec<syn::Attribute>`
  = note: required because it appears within the type `syn::TypeParam`
  = note: required because it appears within the type `syn::GenericParam`
  = note: required because it appears within the type `*const syn::GenericParam`
  = note: required because it appears within the type `std::ptr::Unique<syn::GenericParam>`
  = note: required because it appears within the type `alloc::raw_vec::RawVec<syn::GenericParam>`
  = note: required because it appears within the type `std::vec::Vec<syn::GenericParam>`
  = note: required because it appears within the type `Structure<'a>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0275`.
error: Could not document `synstructure`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name synstructure /home/daboross/.cargo/registry/src/github.com-1ecc6299db9ec823/synstructure-0.11.0/src/lib.rs --cap-lints allow --color always -o /home/daboross/stest/target/doc -L dependency=/home/daboross/stest/target/debug/deps --extern proc_macro2=/home/daboross/stest/target/debug/deps/libproc_macro2-5a0d9421c670a9a2.rmeta --extern quote=/home/daboross/stest/target/debug/deps/libquote-0b983089d60fae1d.rmeta --extern syn=/home/daboross/stest/target/debug/deps/libsyn-1579b4397ac9fb62.rmeta --extern unicode_xid=/home/daboross/stest/target/debug/deps/libunicode_xid-83d32fbf12bd2baf.rmeta` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed

To reproduce, create an empty new project, and add the following dependencies:

synstructure = "0.11"
syn = { version = "0.15", features = ["full"] }

Running cargo +stable doc with rust 1.36.0 succeeds, but running cargo +beta doc fails with the above error. Strangely, the crate continues to compile fine - it's only running cargo doc which fails.

Being more precise, this succeeds in nightly-2019-06-21, and fails in nightly-2019-06-22.

I'm guessing that this could just be an issue with synstructure, but the fact that it failed with a rustc upgrade combined with the fact that it fails in cargo doc but not cargo build or cargo test makes me think there could be some other issue here?

Full `Cargo.toml`
[package]
name = "stest"
version = "0.1.0"
authors = ["David Ross <daboross@daboross.net>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
synstructure = "0.11"
syn = { version = "0.15", features = ["full"] }
Full `Cargo.lock`
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "proc-macro2"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "quote"
version = "0.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "stest"
version = "0.1.0"
dependencies = [
 "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
 "synstructure 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "syn"
version = "0.15.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
 "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "synstructure"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
 "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
 "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[metadata]
"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db"
"checksum syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d960b829a55e56db167e861ddb43602c003c7be0bee1d345021703fac2fb7c"
"checksum synstructure 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a31c862c910b86af7938de3a4f176e89c4dfcb484d119593d456b86c3f0f8ea"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"

Activity

changed the title [-]"overflow evluating the requirement" documenting synstructures in beta[/-] [+]"overflow evaluating the requirement" documenting synstructures in rustdoc beta[/+] on Jul 10, 2019
changed the title [-]"overflow evaluating the requirement" documenting synstructures in rustdoc beta[/-] [+]"overflow evaluating the requirement" documenting synstructures in rustdoc beta, but not rustdoc stable nor rustc beta[/+] on Jul 10, 2019
added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Jul 10, 2019
Centril

Centril commented on Jul 10, 2019

@Centril
Contributor
nagisa

nagisa commented on Jul 11, 2019

@nagisa
Member

Duplicate of #62059.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nagisa@Centril@daboross

        Issue actions

          "overflow evaluating the requirement" documenting synstructures in rustdoc beta, but not rustdoc stable nor rustc beta · Issue #62573 · rust-lang/rust