Resolve items for cross-crate imports relative to the original module by jyn514 · Pull Request #73101 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation44 Commits19 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
r? @ollie27
(rust_highfive has picked a reviewer for you, use r? to override)
This comment has been minimized.
This comment has been minimized.
Current error:
(-bash@build-server) ~/.../src/test ▶️ rustdoc +stage1 rustdoc/macro-in-closure.rs
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /home/joshua/src/rust/src/librustc_hir/definitions.rs:358:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
(-bash@build-server) ~/.../src/test ▶️ cat !$
cat rustdoc/macro-in-closure.rs
// Regression issue for rustdoc ICE encountered in PR #65252.
#![feature(decl_macro)]
fn main() {
|| {
macro m() {}
};
}
This seems to be because of #71820.
Backtrace
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /home/joshua/src/rust/src/librustc_hir/definitions.rs:358:9
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1076
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1537
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:198
9: std::panicking::default_hook
at src/libstd/panicking.rs:218
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:477
11: rust_begin_unwind
at src/libstd/panicking.rs:385
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:86
13: core::panicking::panic
at src/libcore/panicking.rs:51
14: rustc_middle::hir::map::Map::def_kind
at src/librustc_middle/hir/map/mod.rs:0
15: rustc_middle::hir::map::provide::{{closure}}
at src/librustc_middle/hir/map/mod.rs:1070
16: core::ops::function::FnOnce::call_once
at ./src/libcore/ops/function.rs:232
17: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::def_kind>::compute
at ./src/librustc_middle/ty/query/plumbing.rs:362
18: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
at ./src/librustc_query_system/dep_graph/graph.rs:303
19: rustc_query_system::query::plumbing::force_query_with_job::{{closure}}::{{closure}}
at ./src/librustc_query_system/dep_graph/graph.rs:0
20: rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}::{{closure}}
at ./src/librustc_middle/ty/query/plumbing.rs:72
21: stacker::maybe_grow
at /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/stacker-0.1.9/src/lib.rs:52
22: rustc_data_structures::stack::ensure_sufficient_stack
at ./src/librustc_data_structures/stack.rs:16
23: rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}
at ./src/librustc_middle/ty/query/plumbing.rs:72
24: rustc_middle::ty::context::tls::enter_context::{{closure}}
at ./src/librustc_middle/ty/context.rs:1702
25: rustc_middle::ty::context::tls::set_tlv
at ./src/librustc_middle/ty/context.rs:1686
26: rustc_middle::ty::context::tls::enter_context
at ./src/librustc_middle/ty/context.rs:1702
27: rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}
at ./src/librustc_middle/ty/query/plumbing.rs:71
28: rustc_middle::ty::context::tls::with_related_context::{{closure}}
at ./src/librustc_middle/ty/context.rs:1790
29: rustc_middle::ty::context::tls::with_context::{{closure}}
at ./src/librustc_middle/ty/context.rs:1774
30: rustc_middle::ty::context::tls::with_context_opt
at ./src/librustc_middle/ty/context.rs:1763
31: rustc_middle::ty::context::tls::with_context
at ./src/librustc_middle/ty/context.rs:1774
32: rustc_middle::ty::context::tls::with_related_context
at ./src/librustc_middle/ty/context.rs:1787
33: rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query
at ./src/librustc_middle/ty/query/plumbing.rs:60
34: rustc_query_system::query::plumbing::force_query_with_job::{{closure}}
at ./src/librustc_query_system/query/plumbing.rs:589
35: rustc_query_system::query::plumbing::with_diagnostics
at ./src/librustc_query_system/query/plumbing.rs:296
36: rustc_query_system::query::plumbing::force_query_with_job
at ./src/librustc_query_system/query/plumbing.rs:588
37: rustc_query_system::query::plumbing::try_execute_query
at ./src/librustc_query_system/query/plumbing.rs:415
38: rustc_query_system::query::plumbing::get_query_impl::{{closure}}
at ./src/librustc_query_system/query/plumbing.rs:639
39: <rustc_query_system::query::caches::DefaultCache<K,V> as rustc_query_system::query::caches::QueryCache>::lookup
at ./src/librustc_query_system/query/caches.rs:111
40: rustc_query_system::query::plumbing::try_get_cached
at ./src/librustc_query_system/query/plumbing.rs:369
41: rustc_query_system::query::plumbing::get_query_impl
at ./src/librustc_query_system/query/plumbing.rs:631
42: rustc_query_system::query::plumbing::get_query
at ./src/librustc_query_system/query/plumbing.rs:731
43: rustc_middle::ty::query::TyCtxtAt::def_kind
at ./src/librustc_middle/ty/query/plumbing.rs:472
44: rustc_middle::ty::query::<impl rustc_middle::ty::context::TyCtxt>::def_kind
at ./src/librustc_middle/ty/query/plumbing.rs:433
45: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::fold::DocFolder>::fold_item
at src/librustdoc/passes/collect_intra_doc_links.rs:400
46: rustdoc::fold::DocFolder::fold_mod::{{closure}}
at src/librustdoc/fold.rs:88
47: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
at ./src/libcore/ops/function.rs:274
48: core::iter::traits::iterator::Iterator::find_map::check::{{closure}}
at ./src/libcore/iter/traits/iterator.rs:2258
49: core::iter::traits::iterator::Iterator::try_fold
at ./src/libcore/iter/traits/iterator.rs:1889
50: core::iter::traits::iterator::Iterator::find_map
at ./src/libcore/iter/traits/iterator.rs:2264
51: <core::iter::adapters::FilterMap<I,F> as core::iter::traits::iterator::Iterator>::next
at ./src/libcore/iter/adapters/mod.rs:1128
52: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
at ./src/liballoc/vec.rs:2081
53: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
at ./src/liballoc/vec.rs:1983
54: core::iter::traits::iterator::Iterator::collect
at ./src/libcore/iter/traits/iterator.rs:1671
55: rustdoc::fold::DocFolder::fold_mod
at src/librustdoc/fold.rs:88
56: rustdoc::fold::DocFolder::fold_inner_recur
at src/librustdoc/fold.rs:26
57: rustdoc::fold::DocFolder::fold_item_recur
at src/librustdoc/fold.rs:79
58: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::fold::DocFolder>::fold_item
at src/librustdoc/passes/collect_intra_doc_links.rs:727
59: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::fold::DocFolder>::fold_crate::{{closure}}
at src/librustdoc/passes/collect_intra_doc_links.rs:741
60: core::option::Option<T>::and_then
at ./src/libcore/option.rs:672
61: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::fold::DocFolder>::fold_crate
at src/librustdoc/passes/collect_intra_doc_links.rs:741
62: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
at src/librustdoc/passes/collect_intra_doc_links.rs:41
63: rustdoc::core::run_core::{{closure}}::{{closure}}::{{closure}}
at src/librustdoc/core.rs:553
64: rustc_middle::ty::context::tls::enter_global::{{closure}}
at ./src/librustc_middle/ty/context.rs:1725
65: rustc_middle::ty::context::tls::enter_context::{{closure}}
at ./src/librustc_middle/ty/context.rs:1702
66: rustc_middle::ty::context::tls::set_tlv
at ./src/librustc_middle/ty/context.rs:1686
67: rustc_middle::ty::context::tls::enter_context
at ./src/librustc_middle/ty/context.rs:1702
68: rustc_middle::ty::context::tls::enter_global
at ./src/librustc_middle/ty/context.rs:1725
69: rustc_interface::passes::QueryContext::enter
at ./src/librustc_interface/passes.rs:712
70: rustdoc::core::run_core::{{closure}}::{{closure}}
at src/librustdoc/core.rs:411
71: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
at ./src/librustc_interface/queries.rs:385
72: rustdoc::core::run_core::{{closure}}
at src/librustdoc/core.rs:373
73: rustc_interface::interface::run_compiler_in_existing_thread_pool::{{closure}}
at ./src/librustc_interface/interface.rs:195
74: rustc_span::with_source_map
at ./src/librustc_span/lib.rs:726
75: rustc_interface::interface::run_compiler_in_existing_thread_pool
at ./src/librustc_interface/interface.rs:189
76: rustdoc::core::run_core
at src/librustdoc/core.rs:372
77: rustdoc::rust_input::{{closure}}
at src/librustdoc/lib.rs:523
78: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at ./src/libstd/panic.rs:318
79: std::panicking::try::do_call
at ./src/libstd/panicking.rs:297
80: std::panicking::try
at ./src/libstd/panicking.rs:274
81: std::panic::catch_unwind
at ./src/libstd/panic.rs:394
82: rustc_driver::catch_fatal_errors
at ./src/librustc_driver/lib.rs:1124
83: rustdoc::rust_input
at src/librustdoc/lib.rs:520
84: rustdoc::main_options
at src/librustdoc/lib.rs:484
85: rustdoc::main_args::{{closure}}
at src/librustdoc/lib.rs:450
86: rustc_interface::util::spawn_thread_pool::{{closure}}::{{closure}}::{{closure}}
at ./src/librustc_interface/util.rs:149
87: scoped_tls::ScopedKey<T>::set
at /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
88: rustc_interface::util::spawn_thread_pool::{{closure}}::{{closure}}
at ./src/librustc_interface/util.rs:145
89: scoped_tls::ScopedKey<T>::set
at /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
90: rustc_ast::attr::with_globals::{{closure}}
at ./src/librustc_ast/attr/mod.rs:44
91: scoped_tls::ScopedKey<T>::set
at /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
92: rustc_ast::attr::with_globals
at ./src/librustc_ast/attr/mod.rs:44
93: rustc_interface::util::spawn_thread_pool::{{closure}}
at ./src/librustc_interface/util.rs:144
94: rustc_interface::util::scoped_thread::{{closure}}
at ./src/librustc_interface/util.rs:119
This can't be fixed in rustdoc, all I'm doing is calling def_kind()
:
// The immediate parent might not always be a module.
// Find the first parent which is.
loop {
if let Some(parent) = self.cx.tcx.parent(current) {
if self.cx.tcx.def_kind(parent) == DefKind::Mod {
break Some(parent);
}
current = parent;
} else {
break None;
}
}
It looks like it will need to be fixed in rustc (possibly by #72088?)
The job x86_64-gnu-llvm-8
of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.
Click to expand the log.
##[section]Starting: Linux x86_64-gnu-llvm-8
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 8'
Agent machine name: 'fv-az578'
Current agent version: '2.169.1'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200517.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200517.1/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.3)
Checking job knob settings.
Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG}
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/6259a7e3-d2fa-44d9-9d72-9b452d8584b9.sh
##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/73101/merge:refs/remotes/pull/73101/merge
---
---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --llvm-root=/usr/lib/llvm-8 --enable-llvm-link-shared --set rust.thin-lto-import-instr-limit=10
---> Using cache
---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy && python2.7 ../x.py test src/test/mir-opt --pass=build --target=armv5te-unknown-linux-gnueabi && python2.7 ../x.py test src/tools/tidy
---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
---> Using cache
---> 091087e35a36
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
............................i...............i....................................................... 5200/10285
.................................................................................................... 5300/10285
............................................................................i....................... 5400/10285
......................................................................i............................. 5500/10285
.......................................................................................ii.ii........ 5600/10285
i...i............................................................................................... 5700/10285
......................................i............................................................. 5900/10285
............................................................................................ii...... 6000/10285
...............................i.................................................................... 6100/10285
.................................................................................................... 6200/10285
.................................................................................................... 6200/10285
.................................................................................................... 6300/10285
......................................................ii...i..ii...........i........................ 6400/10285
.................................................................................................... 6600/10285
.................................................................................................... 6700/10285
.................................................................................................... 6700/10285
.......................................................................................i..ii........ 6800/10285
.................................................................................................... 7000/10285
.................................................................................................... 7100/10285
.........................................i.......................................................... 7200/10285
.................................................................................................... 7300/10285
---
.................................................................................................... 8200/10285
.................................................................................................... 8300/10285
................................................................................i................... 8400/10285
.................................................................................................... 8500/10285
..................................iiiiii.iiiiii.i................................................... 8600/10285
.................................................................................................... 8800/10285
.................................................................................................... 8900/10285
.................................................................................................... 9000/10285
.................................................................................................... 9100/10285
---
Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 192 tests
iiii......i..............ii.i..........i......................i...........i..i................i....i 100/192
.............i.i.i...iii..iiiiiiiiiiiiiiii.......................iii................ii......
finished in 5.783
Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 21 tests
iiiiiiiiiiiiiiiiiiiii
finished in 0.157
Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 115 tests
iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
...iiii.....ii.
finished in 14.661
Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
test result: FAILED. 340 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
Build completed unsuccessfully in 1:06:55
Build completed unsuccessfully in 1:06:55
== clock drift check ==
local time: Sun Jun 7 22:21:44 UTC 2020
network time: Sun, 07 Jun 2020 22:21:44 GMT
== end clock drift check ==
##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/73101/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3954) (python)
##[section]Finishing: Finalize Job
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra
. (Feature Requests)
I may have finally figured out how serialization is related. Currently, this requires you to document all dependencies at the same time - if you pass --no-deps
, the links will be silently ignored again. I'm not sure entirely why ... but this seems like something that could be fixed in a follow-up PR.
Since --no-deps
is a flag to cargo, not to rustdoc, this is very confusing. The command line cargo passes to rustdoc is the same in both cases:
$ cargo doc --no-deps -v
Documenting b v0.1.0 (/home/joshua/src/test-rustdoc/b)
Running `rustdoc --crate-type lib --crate-name b src/lib.rs -o /home/joshua/src/test-rustdoc/b/doc --error-format=json --json=diagnostic-rendered-ansi -L dependency=/home/joshua/src/test-rustdoc/b/debug/deps --extern a=/home/joshua/src/test-rustdoc/b/debug/deps/liba-d962d8f2c027d5fc.rmeta`
$ cargo doc -v
Documenting b v0.1.0 (/home/joshua/src/test-rustdoc/b)
Running `rustdoc --crate-type lib --crate-name b src/lib.rs -o /home/joshua/src/test-rustdoc/b/doc --error-format=json --json=diagnostic-rendered-ansi -L dependency=/home/joshua/src/test-rustdoc/b/debug/deps --extern a=/home/joshua/src/test-rustdoc/b/debug/deps/liba-d962d8f2c027d5fc.rmeta`
The only difference is whether it documented a
beforehand:
// by default
Documenting a v0.1.0 (/home/joshua/src/test-rustdoc/a)
Fresh a v0.1.0 (/home/joshua/src/test-rustdoc/a)
Running `rustdoc --edition=2018 --crate-type lib --crate-name a /home/joshua/src/test-rustdoc/a/src/lib.rs -o /home/joshua/src/test-rustdoc/b/doc --error-format=json --json=diagnostic-rendered-ansi -L dependency=/home/joshua/src/test-rustdoc/b/debug/deps`
// with --no-deps
Checking a v0.1.0 (/home/joshua/src/test-rustdoc/a)
Running `rustc --crate-name a --edition=2018 /home/joshua/src/test-rustdoc/a/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C debuginfo=2 -C metadata=d962d8f2c027d5fc -C extra-filename=-d962d8f2c027d5fc --out-dir /home/joshua/src/test-rustdoc/b/debug/deps -C incremental=/home/joshua/src/test-rustdoc/b/debug/incremental -L dependency=/home/joshua/src/test-rustdoc/b/debug/deps`
The job x86_64-gnu-llvm-8
of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.
Click to expand the log.
##[section]Starting: Linux x86_64-gnu-llvm-8
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 3'
Agent machine name: 'fv-az578'
Current agent version: '2.169.1'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200517.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200517.1/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.3)
Checking job knob settings.
Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG}
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/592494fd-d173-49cd-b5b9-cf2f41cc087f.sh
##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/73101/merge:refs/remotes/pull/73101/merge
---
---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --llvm-root=/usr/lib/llvm-8 --enable-llvm-link-shared --set rust.thin-lto-import-instr-limit=10
---> Using cache
---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy && python2.7 ../x.py test src/test/mir-opt --pass=build --target=armv5te-unknown-linux-gnueabi && python2.7 ../x.py test src/tools/tidy
---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
---> Using cache
---> 091087e35a36
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
............................i...............i....................................................... 5200/10285
.................................................................................................... 5300/10285
............................................................................i....................... 5400/10285
......................................................................i............................. 5500/10285
.......................................................................................ii.ii........ 5600/10285
i...i............................................................................................... 5700/10285
......................................i............................................................. 5900/10285
............................................................................................ii...... 6000/10285
...............................i.................................................................... 6100/10285
.................................................................................................... 6200/10285
.................................................................................................... 6200/10285
.................................................................................................... 6300/10285
......................................................ii...i..ii...........i........................ 6400/10285
.................................................................................................... 6600/10285
.................................................................................................... 6700/10285
........................................................................................i.ii........ 6800/10285
.................................................................................................... 6900/10285
---
.................................................................................................... 8200/10285
.................................................................................................... 8300/10285
................................................................................i................... 8400/10285
.................................................................................................... 8500/10285
...................................iiiiiiiiiiii.i................................................... 8600/10285
.................................................................................................... 8800/10285
.................................................................................................... 8900/10285
.................................................................................................... 9000/10285
.................................................................................................... 9100/10285
---
Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 193 tests
iiii......i..............ii.i..........i......................i...........i..i................i....i 100/193
.............i.i.i...iii..iiiiiiiiiiiiiiiii.......................iii................ii......
finished in 5.598
Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 21 tests
iiiiiiiiiiiiiiiiiiiii
finished in 0.154
Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 115 tests
iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
...iiii.....ii.
finished in 15.071
Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
---- [rustdoc] rustdoc/intra-doc-crate/additional_doc.rs stdout ----
error: rustdoc failed!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc/auxiliary" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc" "/checkout/src/test/rustdoc/intra-doc-crate/additional_doc.rs"
------------------------------------------
------------------------------------------
stderr:
---
3 | extern crate rand;
| ^^^^^^^^^^^^^^^^^^
|
= note: candidates:
crate `rand`: /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc/auxiliary/librand.so
crate `rand`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-92c7d08cf29c6af0.rlib
error[E0463]: can't find crate for `rand`
--> /checkout/src/test/rustdoc/intra-doc-crate/additional_doc.rs:3:1
|
3 | extern crate rand;
---
test result: FAILED. 342 passed; 2 failed; 2 ignored; 0 measured; 0 filtered out
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
Build completed unsuccessfully in 1:08:05
Build completed unsuccessfully in 1:08:05
== clock drift check ==
local time: Mon Jun 8 03:24:30 UTC 2020
network time: Mon, 08 Jun 2020 03:24:31 GMT
== end clock drift check ==
##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/73101/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4029) (python)
##[section]Finishing: Finalize Job
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra
. (Feature Requests)
☔ The latest upstream changes (presumably #73115) made this pull request unmergeable. Please resolve the merge conflicts.
The job x86_64-gnu-llvm-8
of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.
Click to expand the log.
##[section]Starting: Linux x86_64-gnu-llvm-8
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 63'
Agent machine name: 'fv-az619'
Current agent version: '2.169.1'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200517.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200517.1/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.3)
Checking job knob settings.
Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG}
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/4d77ba44-5670-4972-a88e-379cd788c05b.sh
##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/73101/merge:refs/remotes/pull/73101/merge
---
---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --llvm-root=/usr/lib/llvm-8 --enable-llvm-link-shared --set rust.thin-lto-import-instr-limit=10
---> Using cache
---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy && python2.7 ../x.py test src/test/mir-opt --pass=build --target=armv5te-unknown-linux-gnueabi && python2.7 ../x.py test src/tools/tidy
---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
---> Using cache
---> 091087e35a36
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
.............................i...............i...................................................... 5200/10289
.................................................................................................... 5300/10289
.............................................................................i...................... 5400/10289
.......................................................................i............................ 5500/10289
........................................................................................ii.ii....... 5600/10289
.i...i.............................................................................................. 5700/10289
.......................................i............................................................ 5900/10289
.............................................................................................ii..... 6000/10289
................................i................................................................... 6100/10289
.................................................................................................... 6200/10289
.................................................................................................... 6200/10289
.................................................................................................... 6300/10289
.......................................................ii...i..ii...........i....................... 6400/10289
.................................................................................................... 6600/10289
.................................................................................................... 6700/10289
.................................................................................................... 6700/10289
........................................................................................i..ii....... 6800/10289
.................................................................................................... 7000/10289
.................................................................................................... 7100/10289
..........................................i......................................................... 7200/10289
.................................................................................................... 7300/10289
---
.................................................................................................... 8200/10289
.................................................................................................... 8300/10289
..................................................................................i................. 8400/10289
.................................................................................................... 8500/10289
....................................iiiiii.iiiiii.i................................................. 8600/10289
.................................................................................................... 8800/10289
.................................................................................................... 8900/10289
.................................................................................................... 9000/10289
.................................................................................................... 9100/10289
---
Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 193 tests
iiii......i..............ii.i..........i......................i...........i..i................i....i 100/193
.............i.i.i...iii..iiiiiiiiiiiiiiiii.......................iii................ii......
finished in 5.665
Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 21 tests
iiiiiiiiiiiiiiiiiiiii
finished in 0.149
Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 115 tests
iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
...iiii.....ii.
finished in 14.986
Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
---- [rustdoc] rustdoc/intra-doc-crate/additional_doc.rs stdout ----
error: rustdoc failed!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc/auxiliary" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc" "/checkout/src/test/rustdoc/intra-doc-crate/additional_doc.rs"
------------------------------------------
------------------------------------------
stderr:
---
3 | extern crate rand;
| ^^^^^^^^^^^^^^^^^^
|
= note: candidates:
crate `rand`: /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc/auxiliary/librand.so
crate `rand`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-92c7d08cf29c6af0.rlib
error[E0463]: can't find crate for `rand`
--> /checkout/src/test/rustdoc/intra-doc-crate/additional_doc.rs:3:1
|
3 | extern crate rand;
---
thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
Build completed unsuccessfully in 1:15:21
Build completed unsuccessfully in 1:15:21
== clock drift check ==
local time: Mon Jun 8 23:33:20 UTC 2020
network time: Mon, 08 Jun 2020 23:33:20 GMT
== end clock drift check ==
##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/73101/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4315) (python)
##[section]Finishing: Finalize Job
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra
. (Feature Requests)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach seems overall good. It seems like the exportmap contained all the metadata for this already, just in a somewhat hidden way!
_ => None, |
---|
use rustc_middle::ty::DefIdTree; |
let parent_node = if item.is_fake() { |
// FIXME: is this correct? |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we'll never hit this case, it's only for auto traits and blanket impls, which don't get docs resolved on the local scope anyway.
What happens if you panic here? Especially if you try and document a blanket impl that uses intra doc links?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rustdoc panics if I don't check this (with or without an explicit panic):
thread 'rustc' panicked at 'index out of bounds: the len is 38899 but the index is 38905', /home/joshua/src/rust/src/librustc_hir/definitions.rs:53:9
18: rustc_hir::definitions::DefPathTable::def_key
at /home/joshua/src/rust/src/librustc_hir/definitions.rs:53
19: rustc_metadata::rmeta::decoder::<impl rustc_metadata::creader::CrateMetadataRef>::def_key
at src/librustc_metadata/rmeta/decoder.rs:1411
20: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_middle::middle::cstore::CrateStore for rustc_metadata::creader::CStore>::def_key
at src/librustc_metadata/rmeta/decoder/cstore_impl.rs:484
21: rustc_middle::ty::context::TyCtxt::def_key
at src/librustc_middle/ty/context.rs:1188
22: <rustc_middle::ty::context::TyCtxt as rustc_middle::ty::DefIdTree>::parent
at src/librustc_middle/ty/mod.rs:358
23: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::fold::DocFolder>::fold_item
at src/librustdoc/passes/collect_intra_doc_links.rs:482
This was the motivation for #73098.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And actually it will panic on any file, including empty files.
I cherry-picked the commits from #73103 and confirmed that they fix the test failure.
I may have finally figured out how serialization is related. Currently, this requires you to document all dependencies at the same time - if you pass
--no-deps
, the links will be silently ignored again.
I figured out the issue here: in href, the documentation will be completely ignored if neither an existing file nor an external HTML root is available. If you pass --extern-html-root-url
it will still work, so all of this will work on docs.rs, as well as compiling locally. The only time it will break is with --no-deps
locally, in which the other crate documentation isn't available in any case.
The job x86_64-gnu-llvm-8
of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.
Click to expand the log.
##[section]Starting: Linux x86_64-gnu-llvm-8
##[section]Starting: Initialize job
Agent name: 'Azure Pipelines 7'
Agent machine name: 'fv-az619'
Current agent version: '2.170.1'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200517.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200517.1/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.3)
Checking job knob settings.
Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG}
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/5de90495-5909-442c-8c70-9817b8245bab.sh
##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/73101/merge:refs/remotes/pull/73101/merge
---
---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --llvm-root=/usr/lib/llvm-8 --enable-llvm-link-shared --set rust.thin-lto-import-instr-limit=10
---> Using cache
---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy && python2.7 ../x.py test src/test/mir-opt --pass=build --target=armv5te-unknown-linux-gnueabi && python2.7 ../x.py test src/tools/tidy
---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
---> Using cache
---> 091087e35a36
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
Compiling rustc_parse_format v0.0.0 (/checkout/src/librustc_parse_format)
Compiling chalk-rust-ir v0.10.0
Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
Compiling chalk-solve v0.10.0
Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
..............................i...............i..................................................... 5200/10292
.................................................................................................... 5300/10292
..............................................................................i..................... 5400/10292
........................................................................i........................... 5500/10292
.........................................................................................ii.ii...... 5600/10292
..i...i............................................................................................. 5700/10292
........................................i........................................................... 5900/10292
..............................................................................................ii.... 6000/10292
.................................i.................................................................. 6100/10292
.................................................................................................... 6200/10292
.................................................................................................... 6200/10292
.................................................................................................... 6300/10292
........................................................ii...i..ii...........i...................... 6400/10292
.................................................................................................... 6600/10292
.................................................................................................... 6700/10292
.................................................................................................... 6700/10292
.........................................................................................i..ii...... 6800/10292
.................................................................................................... 7000/10292
.................................................................................................... 7100/10292
...........................................i........................................................ 7200/10292
.................................................................................................... 7300/10292
---
.................................................................................................... 8200/10292
.................................................................................................... 8300/10292
...................................................................................i................ 8400/10292
.................................................................................................... 8500/10292
......................................iiiiiiiiiiii.i................................................ 8600/10292
.................................................................................................... 8800/10292
.................................................................................................... 8900/10292
.................................................................................................... 9000/10292
.................................................................................................... 9100/10292
---
Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 193 tests
iiii......i..............ii.i..........i......................i...........i..i................i....i 100/193
.............i.i.i...iii..iiiiiiiiiiiiiiiii.......................iii................ii......
finished in 5.491
Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 21 tests
iiiiiiiiiiiiiiiiiiiii
finished in 0.141
Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 115 tests
iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
...iiii.....ii.
finished in 14.579
Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
---- [rustdoc] rustdoc/intra-doc-crate/additional_doc.rs stdout ----
error: rustdoc failed!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc/auxiliary" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc" "/checkout/src/test/rustdoc/intra-doc-crate/additional_doc.rs"
------------------------------------------
------------------------------------------
stderr:
---
3 | extern crate rand;
| ^^^^^^^^^^^^^^^^^^
|
= note: candidates:
crate `rand`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-92c7d08cf29c6af0.rlib
crate `rand`: /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/intra-doc-crate/additional_doc/auxiliary/librand.so
error[E0463]: can't find crate for `rand`
--> /checkout/src/test/rustdoc/intra-doc-crate/additional_doc.rs:3:1
|
3 | extern crate rand;
---
thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
Build completed unsuccessfully in 1:10:52
Build completed unsuccessfully in 1:10:52
== clock drift check ==
local time: Wed Jun 10 02:16:51 UTC 2020
network time: Wed, 10 Jun 2020 02:16:51 GMT
== end clock drift check ==
##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/73101/merge to s
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/73101/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4237) (python)
##[section]Finishing: Finalize Job
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra
. (Feature Requests)
@jyn514 yeah iirc in other places where href
gets used it just gets turned into a non-link. I don't think the rustdoc experience is supposed to be pleasant with no-deps
One small issue I found: rustdoc will not warn if resolution fails on a re-export, even if there is additional documentation that wasn't in the original crate.
$ cat src/lib.rs #![warn(intra_doc_resolution_failure)]
extern crate a;
/// Link to [NotHere
]
pub use a::Bar;
$ cat ../a/src/lib.rs
// crate a:
pub struct Foo;
/// Link to [Food]
pub struct Bar;
$ cargo +stage1 doc
Documenting a v0.1.0 (/home/joshua/src/test-rustdoc/a)
Checking a v0.1.0 (/home/joshua/src/test-rustdoc/a)
warning: [Food]
cannot be resolved, ignoring it.
--> /home/joshua/src/test-rustdoc/a/src/lib.rs:4:14
|
4 | /// Link to [Food]
| ^^^^ cannot be resolved, ignoring
|
= note: #[warn(intra_doc_link_resolution_failure)]
on by default
= help: to escape [
and ]
characters, just add '' before them like \[
or \]
warning: 1 warning emitted
Documenting b v0.1.0 (/home/joshua/src/test-rustdoc/b) Finished dev [unoptimized + debuginfo] target(s) in 1.43s
I'm having trouble adding automated tests for this because rustdoc-ui
doesn't accept the // aux-build
syntax.
Manishearth added a commit to Manishearth/rust that referenced this pull request
Manishearth added a commit to Manishearth/rust that referenced this pull request
This was referenced
Jul 17, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request
jyn514 deleted the rustdoc-absolute-module branch
This was referenced
Jul 17, 2020
This was referenced
Jul 18, 2020
jyn514 added a commit to jyn514/rust that referenced this pull request
x.py build/test: stage 1
I've seen very few people who actually use full stage 2 builds on purpose. These compile rustc and libstd twice and don't give you much more information than a stage 1 build (except in rare cases like rust-lang#68692 (comment)). For new contributors, this makes the build process even more daunting than it already is. As long as CI is changed to use --stage 2
I see no downside here.
x.py bench/dist/install: stage 2
These commands have to do with a finished, optimized version of rustc. It seems very rare to want to use these with a stage 1 build.
x.py doc: stage 0
Normally when you document things you're just fixing a typo. In this case there is no need to build the whole rust compiler, since the documentation will usually be the same when generated with the beta compiler or with stage 1.
Note that for this release cycle only there will be a significant different between stage0 and stage1 docs: rust-lang#73101. However most of the time this will not be the case.
This was referenced
Aug 3, 2020
} |
---|
let current_item = match item.inner { |
ModuleItem(..) => { |
if item.attrs.inner_docs { |
if item_hir_id.unwrap() != hir::CRATE_HIR_ID { item.name.clone() } else { None } |
if item.def_id.is_top_level_module() { item.name.clone() } else { None } |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug, there should be a !
in front.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit is getting removed altogether in #76467, so I don't think there's much point in fixing it.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request
Labels
Area: Documentation that has been re-exported from a different crate
Area: Intra-doc links, the ability to link to items in docs by name
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the rustdoc team, which will review and decide on the PR/issue.