Closed GlenDC closed 1 year ago
This is a new issue by the way. I cannot remember what version exactly, but previously I was using a version of around 07-07
and that was working for me fine. I only noticed this error as my CI which uses whatever latest nightly got this error for the doc test. Trying it with latest nightly myself locally gives me 100% this failure as well, but only for cargo doc
. All other cargo
commands work fine.
E.g. cargo run
, cargo test
, cargo clippy
, etc etc... these all work fine.
Bisection result:
searched nightlies: from nightly-2023-07-09 to nightly-2023-07-13 regressed nightly: nightly-2023-07-11 searched commit range: https://github.com/rust-lang/rust/compare/1065d876cdbc34a872b9e17c78caaa59ea0c94d4...8ca44ef9caa4049d584fbbce218c219cdca33a2f regressed commit: https://github.com/rust-lang/rust/commit/8ca44ef9caa4049d584fbbce218c219cdca33a2f (#112988)
cc @spastorino
Is there something you or anyone need more from me on this one by the way?
FYI, for now I pinned my toolchain to nightly-2023-07-08
and that makes it work for my dev machine, as well as my CI. So I am not blocked on this. If you do need me for more input or information, do let me know. And thank you for everything.
No, I'll take a look at this today and hopefully have a fix up soon. Thanks, @GlenDC.
We're accessing hir for RPITITs in this case in ...
// FIXME(@lcnr): Remove this function.
pub fn get_attrs_unchecked(self, did: DefId) -> &'tcx [ast::Attribute] {
if let Some(did) = did.as_local() {
self.hir().attrs(self.hir().local_def_id_to_hir_id(did))
} else {
self.item_attrs(did)
}
}
Likely we want a check for self.is_impl_trait_in_trait(did)
to avoid doing so.
This might also be the reason why docs are for now failing at docs.rs
.I guess?
This is the url to the build log btw: https://docs.rs/crate/tower-async/0.1.0/builds/863682 (you can also access it from the linked docs.rs crate doc page). Too bad I cannot select the toolchain with https://docs.rs/about/metadata that would fix it for that use case as well.
Can I help with fixing this issue? If someone can mentor me I do not mind picking it up?
Sorry, I'm working on it. I was experimenting with a bit more thorough fix, but that fell through the cracks since I was traveling the past few weeks.
Ah yes, no worries. No pressure. In that case I’ll wait patiently. Do let me know if I can be of any more meaning now or later, as I’m pretty invested in these functionalities.
This issue got fixed, right? I can't reproduce it (using plabayo/tower-async#bd868b123eeb4fc65ea066fb107e3e41c306b4b3 from your repo).
(closing, please reopen if it's in-fact not fixed. I think @fmease inadvertently fixed this in #113956).
Can the docs.rs version of https://docs.rs/crate/tower-async/0.1.1 be recompile for me? Or do I need to request that as a separate issue somewhere else @compiler-errors ?
I'm not on the docs.rs team (only on the rustdoc-contributors team) and therefore don't know their procedures. However, after having read https://docs.rs/about/builds#failures-and-rebuilds it seems to me that you can request a rebuild after a bug in docs.rs rustdoc has been fixed … by opening an issue in rust-lang/docs.rs, maybe. You might want to try that :)
Thanks I have opened an issue in the right repo, https://github.com/rust-lang/docs.rs/issues/2215.
Code
https://github.com/plabayo/tower-async/pull/3
Meta
rustc --version --verbose
:Error output
Backtrace
``` Checking zstd-safe v5.0.2+zstd.1.5.2 Checking h2 v0.3.20 Checking tower-async-bridge v0.1.0 (/Users/glendc/code/github.com/plabayo/tower-async/tower-async-bridge) Documenting tower-async-bridge v0.1.0 (/Users/glendc/code/github.com/plabayo/tower-async/tower-async-bridge) Documenting tower-async v0.1.0 (/Users/glendc/code/github.com/plabayo/tower-async/tower-async) Checking zstd v0.11.2+zstd.1.5.2 thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_middle/src/ty/context.rs:1992:55 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3:::local_def_id_to_hir_id
4: ::get_attrs_unchecked
5: ::from_def_id_and_parts
6: rustdoc::clean::clean_middle_assoc_item
7: as alloc::vec::spec_from_iter::SpecFromIter, >::iter::{closure#0}>, ::in_definition_order::{closure#0}>, ::get_blanket_impls::{closure#0}>>>::from_iter
8: ::get_blanket_impls
9: rustdoc::clean::utils::get_auto_trait_and_blanket_impls
10: ::visit_item
11: ::visit_item
12: ::visit_item
13: ::visit_crate
14: ::time::, rustdoc::passes::collect_trait_impls::collect_trait_impls::{closure#0}>
15: rustdoc::passes::collect_trait_impls::collect_trait_impls
16: ::time::
17: rustdoc::core::run_global_ctxt
18: ::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache), rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
19: ::enter::>
20: ::enter::>
21: rustc_span::set_source_map::, rustc_interface::interface::run_compiler, rustdoc::main_args::{closure#1}>::{closure#0}::{closure#0}>
22: >::set::, rustdoc::main_args::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md
note: rustc 1.73.0-nightly (33a2c2487 2023-07-12) running on aarch64-apple-darwin
note: compiler flags: --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not document `tower-async`
Caused by:
process didn't exit successfully: `/Users/glendc/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustdoc --edition=2021 --crate-type lib --crate-name tower_async tower-async/src/lib.rs -o /Users/glendc/code/github.com/plabayo/tower-async/target/doc --cfg 'feature="__common"' --cfg 'feature="filter"' --cfg 'feature="full"' --cfg 'feature="futures-core"' --cfg 'feature="futures-util"' --cfg 'feature="make"' --cfg 'feature="retry"' --cfg 'feature="timeout"' --cfg 'feature="tokio"' --cfg 'feature="util"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=210 -C metadata=fa310f585a74fa57 -L dependency=/Users/glendc/code/github.com/plabayo/tower-async/target/debug/deps --extern futures_core=/Users/glendc/code/github.com/plabayo/tower-async/target/debug/deps/libfutures_core-a706d4840a164764.rmeta --extern futures_util=/Users/glendc/code/github.com/plabayo/tower-async/target/debug/deps/libfutures_util-3a9e07db016127ca.rmeta --extern tokio=/Users/glendc/code/github.com/plabayo/tower-async/target/debug/deps/libtokio-f0470835392b88a2.rmeta --extern tower_async_layer=/Users/glendc/code/github.com/plabayo/tower-async/target/debug/deps/libtower_async_layer-dbae86b51ae84235.rmeta --extern tower_async_service=/Users/glendc/code/github.com/plabayo/tower-async/target/debug/deps/libtower_async_service-05577435daedac43.rmeta --crate-version 0.1.0` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
```