rust/compiler
bors d8fc819247 Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, r=wesleywiser
Preserve argument indexes when inlining MIR

We store argument indexes on VarDebugInfo. Unlike the previous method of relying on the variable index to know whether a variable is an argument, this survives MIR inlining.

We also no longer check if var.source_info.scope is the outermost scope. When a function gets inlined, the arguments to the inner function will no longer be in the outermost scope. What we care about though is whether they were in the outermost scope prior to inlining, which we know by whether we assigned an argument index.

Fixes #83217

I considered using `Option<NonZeroU16>` instead of `Option<u16>` to store the index. I didn't because `TypeFoldable` isn't implemented for `NonZeroU16` and because it looks like due to padding, it currently wouldn't make any difference. But I indexed from 1 anyway because (a) it'll make it easier if later it becomes worthwhile to use a `NonZeroU16` and because the arguments were previously indexed from 1, so it made for a smaller change.

This is my first PR on rust-lang/rust, so apologies if I've gotten anything not quite right.
2023-04-13 01:51:27 +00:00
..
rustc fix link 2023-03-11 10:53:47 -06:00
rustc_abi Fix some clippy::complexity 2023-04-09 23:22:14 +02:00
rustc_apfloat
rustc_arena Allow clippy::from_mut_ref 2023-04-09 22:29:56 +02:00
rustc_ast Rollup merge of #110203 - compiler-errors:rtn-dots, r=eholk 2023-04-12 20:56:22 +02:00
rustc_ast_lowering Rollup merge of #110203 - compiler-errors:rtn-dots, r=eholk 2023-04-12 20:56:22 +02:00
rustc_ast_passes Rollup merge of #110237 - oli-obk:impl_trait_in_assoc_tys, r=jackh726 2023-04-12 20:56:24 +02:00
rustc_ast_pretty Remove .. from return type notation 2023-04-10 22:19:46 +00:00
rustc_attr Bless tidy 2023-03-27 18:58:07 +00:00
rustc_baked_icu_data update ICU4X to 1.1.0 2023-02-04 22:28:59 +01:00
rustc_borrowck Auto merge of #110249 - matthiaskrgr:rollup-7iig04q, r=matthiaskrgr 2023-04-12 20:01:36 +00:00
rustc_builtin_macros Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr 2023-04-12 22:19:29 +00:00
rustc_codegen_cranelift Rename Abort terminator to Terminate 2023-04-06 09:34:16 +01:00
rustc_codegen_gcc Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiser 2023-04-11 20:28:45 -07:00
rustc_codegen_llvm Auto merge of #109862 - klensy:llvm-dd, r=nikic 2023-04-08 15:57:59 +00:00
rustc_codegen_ssa Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, r=wesleywiser 2023-04-13 01:51:27 +00:00
rustc_const_eval Auto merge of #110249 - matthiaskrgr:rollup-7iig04q, r=matthiaskrgr 2023-04-12 20:01:36 +00:00
rustc_data_structures Use SSO_ARRAY_SIZE instead of 8 in SsoHashMap impl 2023-04-11 11:02:01 +00:00
rustc_driver Remove unneeded extern crate 2023-02-02 07:47:39 +01:00
rustc_driver_impl Make rustdoc and rustc's help match exactly 2023-04-12 05:27:26 -05:00
rustc_error_codes Make "unneccesary visibility qualifier" error much more clear 2023-04-03 21:52:27 -05:00
rustc_error_messages Stabilize a portion of 'once_cell' 2023-03-29 18:04:44 -04:00
rustc_errors Rollup merge of #110135 - compiler-errors:revert-108031, r=davidtwco 2023-04-12 22:04:35 +02:00
rustc_expand Rollup merge of #110222 - lovelymono:rustc-expand-mbe-diagnostic, r=davidtwco 2023-04-12 20:56:24 +02:00
rustc_feature Rollup merge of #110237 - oli-obk:impl_trait_in_assoc_tys, r=jackh726 2023-04-12 20:56:24 +02:00
rustc_fs_util Add try_canonicalize to rustc_fs_util and use it over fs::canonicalize 2023-03-16 21:50:23 +01:00
rustc_graphviz
rustc_hir Fix some clippy::complexity 2023-04-09 23:22:14 +02:00
rustc_hir_analysis Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb 2023-04-12 20:56:21 +02:00
rustc_hir_pretty Remove identity casts 2023-04-09 23:22:14 +02:00
rustc_hir_typeck Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr 2023-04-12 22:19:29 +00:00
rustc_incremental Check for escape sequences in Fluent resources 2023-03-29 18:34:29 +01:00
rustc_index Fix some clippy::complexity 2023-04-09 23:22:14 +02:00
rustc_infer Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr 2023-04-12 22:19:29 +00:00
rustc_interface Migrate sess.opts.tests uses to sess.is_test_crate() 2023-04-09 21:37:31 +02:00
rustc_lexer Revert "Don't recover lifetimes/labels containing emojis as character literals" 2023-04-10 06:52:41 +00:00
rustc_lint Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb 2023-04-12 20:56:21 +02:00
rustc_lint_defs Fix typos in compiler 2023-04-10 22:02:52 +02:00
rustc_llvm Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiser 2023-04-11 20:28:45 -07:00
rustc_log write threads info into log only when debugging 2023-04-04 15:31:37 +08:00
rustc_macros Auto merge of #110092 - clubby789:builtin-macros-translatable, r=compiler-errors 2023-04-11 14:40:54 +00:00
rustc_metadata Split implied and super predicate queries 2023-04-11 17:45:42 +00:00
rustc_middle Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, r=wesleywiser 2023-04-13 01:51:27 +00:00
rustc_mir_build Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, r=wesleywiser 2023-04-13 01:51:27 +00:00
rustc_mir_dataflow Fix typos in compiler 2023-04-10 22:02:52 +02:00
rustc_mir_transform Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, r=wesleywiser 2023-04-13 01:51:27 +00:00
rustc_monomorphize Fix typos in compiler 2023-04-10 22:02:52 +02:00
rustc_parse Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr 2023-04-12 22:19:29 +00:00
rustc_parse_format Fix typos in compiler 2023-04-10 22:02:52 +02:00
rustc_passes Rollup merge of #110203 - compiler-errors:rtn-dots, r=eholk 2023-04-12 20:56:22 +02:00
rustc_plugin_impl expand: Pass ast::Crate by reference to AST transforming passes 2023-03-23 14:20:55 +04:00
rustc_privacy rustc_middle: Remove Option from module_reexports query 2023-04-08 13:29:16 +03:00
rustc_query_impl Auto merge of #110012 - matthiaskrgr:rollup-sgmm5xv, r=matthiaskrgr 2023-04-06 18:48:42 +00:00
rustc_query_system Auto merge of #109935 - michaelwoerister:fix-feed-in-eval-always, r=cjgillot 2023-04-12 11:16:35 +00:00
rustc_resolve Rollup merge of #110203 - compiler-errors:rtn-dots, r=eholk 2023-04-12 20:56:22 +02:00
rustc_serialize Remove f32 & f64 from MemDecoder/MemEncoder 2023-04-06 00:54:07 -07:00
rustc_session Rollup merge of #110124 - Nilstrieb:📎-told-me-so, r=compiler-errors 2023-04-10 14:13:16 +05:30
rustc_smir Fix new usage of old api 2023-04-06 09:34:16 +01:00
rustc_span Rollup merge of #110237 - oli-obk:impl_trait_in_assoc_tys, r=jackh726 2023-04-12 20:56:24 +02:00
rustc_symbol_mangling Remove index from BrAnon 2023-04-06 23:01:40 -04:00
rustc_target Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb 2023-04-12 20:56:21 +02:00
rustc_trait_selection Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr 2023-04-12 22:19:29 +00:00
rustc_traits Remove u32 on BoundTyKind::Anon 2023-04-06 23:08:04 -04:00
rustc_transmute Some simple clippy::perf fixes 2023-04-09 21:59:28 +02:00
rustc_ty_utils Update ty_utils_never_to_any_not_supported diagnostic message 2023-04-10 22:03:08 +02:00
rustc_type_ir Fix typos in compiler 2023-04-10 22:02:52 +02:00