Closed
Description
Code
I tried this code:
$ git clone https://github.com/weiznich/diesel
$ cd diesel
$ git checkout af0398991219e793f9bc0f0f690513310addb3af
$ cargo +nightly doc --manifest-path diesel/Cargo.toml --no-deps --no-default-features --features "i-implement-a-third-party-backend-and-opt-into-breaking-changes"
I expected to see this happen: Rustdoc compiles the documentation as for older toolchains (stable, < nightly-2022-08-10) or as it is happening for cargo build
/cargo check
Instead, this happened: Rustdoc reports an compiler error
error[E0275]: overflow evaluating the requirement `_: std::marker::Sized`
--> diesel/src/query_dsl/mod.rs:1401:15
|
1401 | Self: methods::ExecuteDsl<Conn>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`diesel`)
note: required because of the requirements on the impl of `query_builder::QueryFragment<_>` for `query_builder::select_statement::SelectStatement<F, S, D, W, O, LOf, G, H, LC>`
--> diesel/src/query_builder/select_statement/mod.rs:162:40
|
162 | impl<F, S, D, W, O, LOf, G, H, LC, DB> QueryFragment<DB>
| ^^^^^^^^^^^^^^^^^
163 | for SelectStatement<F, S, D, W, O, LOf, G, H, LC>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: 127 redundant requirements hidden
= note: required because of the requirements on the impl of `query_builder::QueryFragment<_>` for `query_builder::select_statement::SelectStatement<F, S, D, W, O, LOf, G, H, LC>`
note: required because of the requirements on the impl of `query_dsl::load_dsl::ExecuteDsl<Conn, _>` for `query_builder::select_statement::SelectStatement<F, S, D, W, O, LOf, G, H, LC>`
--> diesel/src/query_dsl/load_dsl.rs:98:19
|
98 | impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
| ^^^^^^^^^^^^^^^^^^^^ ^
For more information about this error, try `rustc --explain E0275`.
Version it worked on
It most recently worked on: nightly-2022-08-09
Version with regression
rustc --version --verbose
:
rustc 1.65.0-nightly (34a6cae28 2022-08-09)
binary: rustc
commit-hash: 34a6cae28e7013ff0e640026a8e46f315426829d
commit-date: 2022-08-09
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 14.0.6
rustdoc --version --verbose
:
rustdoc 1.65.0-nightly (34a6cae28 2022-08-09)
binary: rustdoc
commit-hash: 34a6cae28e7013ff0e640026a8e46f315426829d
commit-date: 2022-08-09
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 14.0.6
cargo-rustc-bisect
points to 6d3f1be as merge that introduced this regression which is a roll-up PR.
#100221 and #99787 are included there and seems to be rustdoc releated. Pinging @compiler-errors and @aDotInTheVoid as authors of these PR's.
Activity
QueryFragment
impls forSelectStatement
andBoxedSelectStatement
diesel-rs/diesel#3257GuillaumeGomez commentedon Aug 16, 2022
I think the bug is coming from #100221.
cc @compiler-errors
EDIT: also, would be quite useful to have a minimum code that we can use as a regression test.
weiznich commentedon Aug 16, 2022
Reducing compiler errors coming from diesel is quite hard and takes a lot of time. Diesel is already part of the rust compiler tests-suite, although in an older version. So it might be easier to just update this version to a current diesel version.
compiler-errors commentedon Aug 16, 2022
This is due to my PR. @rustbot claim
GuillaumeGomez commentedon Aug 16, 2022
diesel
is not documented inside the compiler so it wouldn't be very helpful unfortunately. Also, I didn't ask you specifically, just thought it might be useful to say it, so don't worry if you don't have time for it. 😉Thanks @compiler-errors !
weiznich commentedon Aug 16, 2022
The corresponding test code is here:
rust/src/tools/cargotest/main.rs
Line 85 in 14a459b
I think it did not catch this issue as it uses an older diesel version (and it does not enable the corresponding feature flag).
compiler-errors commentedon Aug 18, 2022
I minimized this:
And fix PR incoming.
is_impossible_method
#10070512 remaining items