a19edd6b16
rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments. Fixes #67586 by limiting `ArgumentVariable` special-casing to `VarDebugInfo` entries that are in `OUTERMOST_SOURCE_SCOPE`, i.e. the function's own argument scope. That excludes `VarDebugInfo` from inlined callees, which can also point to the caller's argument locals. This is a snippet from the optimized MIR (including inlining) of the testcase: ```rust fn foo(_1: usize) -> usize { debug bar => _1; // in scope 0 at ./example.rs:2:12: 2:15 let mut _0: usize; // return place in scope 0 at ./example.rs:2:27: 2:32 scope 1 { debug x => _1; // in scope 1 at /rustc/9ed29b6ff6aa2e048b09c27af8f62ee3040bdb37/src/libcore/convert/mod.rs:106:26: 106:27 } ``` `scope 1` is from inlining the `identity` call, and `debug x => _1;` comes from the body of `core::convert::identity`, so they are now ignored for the purposes of determining the `ArgumentVariable` debuginfo associated to `_1`. |
||
---|---|---|
.. | ||
bootstrap | ||
build_helper | ||
ci | ||
doc | ||
etc | ||
liballoc | ||
libarena | ||
libcore | ||
libfmt_macros | ||
libgraphviz | ||
libpanic_abort | ||
libpanic_unwind | ||
libproc_macro | ||
libprofiler_builtins | ||
librustc | ||
librustc_apfloat | ||
librustc_ast_lowering | ||
librustc_ast_passes | ||
librustc_ast_pretty | ||
librustc_attr | ||
librustc_builtin_macros | ||
librustc_codegen_llvm | ||
librustc_codegen_ssa | ||
librustc_codegen_utils | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_error_codes | ||
librustc_errors | ||
librustc_expand | ||
librustc_feature | ||
librustc_fs_util | ||
librustc_hir | ||
librustc_incremental | ||
librustc_index | ||
librustc_interface | ||
librustc_lexer | ||
librustc_lint | ||
librustc_llvm | ||
librustc_macros | ||
librustc_metadata | ||
librustc_mir | ||
librustc_mir_build | ||
librustc_parse | ||
librustc_passes | ||
librustc_plugin_impl | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_save_analysis | ||
librustc_session | ||
librustc_span | ||
librustc_target | ||
librustc_traits | ||
librustc_ty | ||
librustc_typeck | ||
librustdoc | ||
libserialize | ||
libstd | ||
libsyntax | ||
libterm | ||
libtest | ||
libunwind | ||
llvm-project@d7cdb43592 | ||
rtstartup | ||
rustc | ||
rustllvm | ||
stdarch@dea57529b3 | ||
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.