rust/src
Manish Goregaokar 43d1d6e885
Rollup merge of #48415 - QuietMisdreavus:traits-on-traits-on-traits, r=Manishearth
rustdoc: don't crash when an external trait's docs needs to import another trait

Fixes https://github.com/rust-lang/rust/issues/48414

When resolving intra-paths for an item, rustdoc needs to have information about their items on hand, for proper bookkeeping. When loading a path for an external item, it needs to load these items from their host crate, since their information isn't otherwise available. This includes resolving paths for those docs. which can cause this process to recurse. Rustdoc keeps a map of external traits in a `RefCell<HashMap<DefId, Trait>>`, and it keeps a borrow of this active when importing an external trait. In the linked crash, this led to a RefCell borrow error, panic, and ICE.

This PR manually releases the borrow while importing the trait, and also keeps a list of traits being imported at the given moment. The latter keeps rustdoc from infinitely recursing as it tries to import the same trait repeatedly.
2018-02-24 15:52:11 -08:00
..
binaryen@17841e155e Update binaryen to fix -Werror with GCC 8 2018-02-07 12:20:25 -08:00
bootstrap Bootstrap from the 1.25 beta 2018-02-20 08:52:33 -07:00
build_helper
ci Rollup merge of #48120 - matthiaskrgr:typos_src_1, r=alexcrichton 2018-02-11 00:53:05 +08:00
dlmalloc@9b2dcac06c Update the dlmalloc submodule 2018-02-10 07:01:27 -08:00
doc Update the book to promote second edition 2018-02-21 14:26:09 -05:00
etc fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
grammar
jemalloc@1f5a28755e
liballoc Rollup merge of #48110 - Centril:stabilize/box_leak, r=alexcrichton 2018-02-24 15:52:04 -08:00
liballoc_jemalloc
liballoc_system
libarena
libbacktrace fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
libcompiler_builtins@266ea0740a Update compiler-builtins to latest master. 2018-02-13 22:39:11 +01:00
libcore Rollup merge of #48157 - scottmcm:try-for-each, r=dtolnay 2018-02-23 10:24:49 -08:00
libfmt_macros fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
libgetopts
libgraphviz
liblibc@56444a4545 Revert unintentional submodule updates 2018-02-18 00:21:33 +09:00
libpanic_abort
libpanic_unwind
libproc_macro Do not run the default panic hook inside procedural macros. Fixes #47812 2018-02-20 19:16:49 +01:00
libprofiler_builtins
librustc Rollup merge of #48296 - ishitatsuyuki:exp-unblow, r=nikomatsakis 2018-02-24 15:52:07 -08:00
librustc_allocator Fix up tests and typos 2018-02-18 00:10:40 +09:00
librustc_apfloat fix more typos found by codespell. 2018-02-17 17:38:49 +01:00
librustc_asan
librustc_back Rollup merge of #47890 - pftbest:no_trap, r=alexcrichton 2018-01-31 16:36:17 +08:00
librustc_binaryen Export wasm source map when debug information is enabled 2018-01-30 20:10:58 -06:00
librustc_borrowck fix more typos found by codespell. 2018-02-17 17:38:49 +01:00
librustc_const_eval stage0 cfg cleanup 2018-02-20 08:52:33 -07:00
librustc_const_math
librustc_cratesio_shim
librustc_data_structures Rollup merge of #48402 - eddyb:y-u-no-inline, r=nikomatsakis 2018-02-24 12:48:02 -08:00
librustc_driver Rollup merge of #48353 - michaelwoerister:monoitem-static-defid, r=eddyb 2018-02-24 12:48:01 -08:00
librustc_errors Remove dead code 2018-02-02 09:18:49 +05:30
librustc_incremental incr.comp.: Run cache directory garbage collection before loading dep-graph. 2018-02-13 13:37:32 +01:00
librustc_lint Rollup merge of #48386 - withoutboats:nonstandard-style, r=Manishearth 2018-02-24 15:52:08 -08:00
librustc_llvm rustc: Persist LLVM's Linker in Fat LTO 2018-02-12 09:11:06 -08:00
librustc_lsan
librustc_metadata Auto merge of #47799 - topecongiro:fix-span-of-visibility, r=petrochenkov 2018-02-23 11:21:29 +00:00
librustc_mir Rollup merge of #48061 - nikomatsakis:nll-do-not-run-mir-typeck-twice, r=eddyb 2018-02-24 12:48:03 -08:00
librustc_msan
librustc_passes Rollup merge of #48084 - cramertj:impl-trait-errors, r=nikomatsakis 2018-02-24 12:47:58 -08:00
librustc_platform_intrinsics
librustc_plugin stage0 cfg cleanup 2018-02-20 08:52:33 -07:00
librustc_privacy stage0 cfg cleanup 2018-02-20 08:52:33 -07:00
librustc_resolve Auto merge of #47799 - topecongiro:fix-span-of-visibility, r=petrochenkov 2018-02-23 11:21:29 +00:00
librustc_save_analysis Rollup merge of #48258 - nrc:save-proc-nested, r=eddyb 2018-02-24 12:48:00 -08:00
librustc_trans Rollup merge of #48353 - michaelwoerister:monoitem-static-defid, r=eddyb 2018-02-24 12:48:01 -08:00
librustc_trans_utils stage0 cfg cleanup 2018-02-20 08:52:33 -07:00
librustc_tsan
librustc_typeck Rollup merge of #48392 - estebank:string, r=petrochenkov 2018-02-24 15:52:09 -08:00
librustdoc Rollup merge of #48415 - QuietMisdreavus:traits-on-traits-on-traits, r=Manishearth 2018-02-24 15:52:11 -08:00
libserialize
libstd Rollup merge of #48143 - nikomatsakis:termination_trait_in_tests, r=eddyb 2018-02-24 12:47:58 -08:00
libstd_unicode
libsyntax Rollup merge of #48356 - estebank:unsafe-without-braces, r=nikomatsakis 2018-02-24 12:48:02 -08:00
libsyntax_ext Replace dummy spans with empty spans 2018-02-18 00:10:40 +09:00
libsyntax_pos Fix up tests and typos 2018-02-18 00:10:40 +09:00
libterm
libtest re-export assert_test_result for use when testing libtest itself 2018-02-23 10:11:06 -05:00
libunwind
llvm@9f81beaf32 rustc: Upgrade to LLVM 6 2018-02-09 17:13:14 -08:00
llvm-emscripten@2717444753
rt Remove hoedown from rustdoc 2018-02-16 23:17:15 +01:00
rtstartup
rustc
rustllvm rustc: Persist LLVM's Linker in Fat LTO 2018-02-12 09:11:06 -08:00
test Rollup merge of #48415 - QuietMisdreavus:traits-on-traits-on-traits, r=Manishearth 2018-02-24 15:52:11 -08:00
tools Update Clippy 2018-02-23 09:04:16 -08:00
Cargo.lock Rollup merge of #47933 - Zoxc:plugin-panics, r=nikomatsakis 2018-02-23 10:24:45 -08:00
Cargo.toml Convert python script to rust 2018-02-08 10:53:09 +01:00
stage0.txt Bootstrap from the 1.25 beta 2018-02-20 08:52:33 -07:00