347654324d
Improve Rustdoc's handling of procedural macros Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository. |
||
---|---|---|
.. | ||
bootstrap | ||
build_helper | ||
ci | ||
doc | ||
etc | ||
grammar | ||
liballoc | ||
libarena | ||
libcore | ||
libfmt_macros | ||
libgraphviz | ||
libpanic_abort | ||
libpanic_unwind | ||
libproc_macro | ||
libprofiler_builtins | ||
librustc | ||
librustc_apfloat | ||
librustc_asan | ||
librustc_ast_borrowck | ||
librustc_codegen_llvm | ||
librustc_codegen_ssa | ||
librustc_codegen_utils | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_errors | ||
librustc_fs_util | ||
librustc_incremental | ||
librustc_interface | ||
librustc_lexer | ||
librustc_lint | ||
librustc_llvm | ||
librustc_lsan | ||
librustc_macros | ||
librustc_metadata | ||
librustc_mir | ||
librustc_msan | ||
librustc_passes | ||
librustc_plugin | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_save_analysis | ||
librustc_target | ||
librustc_traits | ||
librustc_tsan | ||
librustc_typeck | ||
librustdoc | ||
libserialize | ||
libstd | ||
libsyntax | ||
libsyntax_ext | ||
libsyntax_pos | ||
libterm | ||
libtest | ||
libunwind | ||
llvm-emscripten@7f23313edf | ||
llvm-project@48818e9f5d | ||
rtstartup | ||
rustc | ||
rustllvm | ||
stdarch@4791ba85e7 | ||
test | ||
tools | ||
README.md | ||
stage0.txt |
This directory contains the source code of the rust project, including:
rustc
and its testslibstd
- Various submodules for tools, like rustdoc, rls, etc.
For more information on how various parts of the compiler work, see the rustc guide.
There is also useful content in this README: https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve.