1
Fork 0
rust/compiler
Jubilee 992aa1edb6
Rollup merge of #122879 - maurer:callsite-instances, r=workingjubilee
CFI: Strip auto traits off Virtual calls

We already use `Instance` at declaration sites when available to glean additional information about possible abstractions of the type in use. This does the same when possible at callsites as well.

The primary purpose of this change is to allow CFI to alter how it generates type information for indirect calls through `Virtual` instances.

This is needed for the "separate machinery" version of my approach to the vtable issues (#122573), because we need to respond differently to a `Virtual` call to the same type as a non-virtual call, specifically [stripping auto traits off the receiver's `Self`](54b15b0c36) because there isn't a separate vtable for `Foo` vs `Foo + Send`.

This would also make a more general underlying mechanism that could be used by rcvalle's [proposed drop detection / encoding](edcd1e20a1) if we end up using his approach, as we could condition out on the `def_id` in the CFI code rather than requiring the generating code to explicitly note whether it was calling drop.
2024-03-23 22:59:42 -07:00
..
rustc
rustc_abi Auto merge of #121668 - erikdesjardins:commonprim, r=scottmcm,oli-obk 2024-03-13 15:25:35 +00:00
rustc_arena
rustc_ast Auto merge of #122869 - matthiaskrgr:rollup-0navj4l, r=matthiaskrgr 2024-03-22 12:29:42 +00:00
rustc_ast_ir Fix typo in VisitorResult 2024-03-08 23:20:29 -05:00
rustc_ast_lowering Rename hir::Node::Local into hir::Node::LetStmt 2024-03-22 20:48:36 +01:00
rustc_ast_passes Rollup merge of #121619 - RossSmyth:pfix_match, r=petrochenkov 2024-03-22 11:36:58 +01:00
rustc_ast_pretty Rollup merge of #121619 - RossSmyth:pfix_match, r=petrochenkov 2024-03-22 11:36:58 +01:00
rustc_attr Rename IntoDiagnostic as Diagnostic. 2024-03-11 09:15:09 +11:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #122629 - RalfJung:assert-unsafe-precondition, r=saethlin 2024-03-23 21:11:00 +00:00
rustc_builtin_macros Auto merge of #119552 - krtab:dead_code_priv_mod_pub_field, r=cjgillot,saethlin 2024-03-23 00:37:05 +00:00
rustc_codegen_cranelift move assert_unsafe_preconditions to its own file 2024-03-23 18:44:17 +01:00
rustc_codegen_gcc CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
rustc_codegen_llvm CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
rustc_codegen_ssa Rollup merge of #122879 - maurer:callsite-instances, r=workingjubilee 2024-03-23 22:59:42 -07:00
rustc_const_eval Rollup merge of #122168 - compiler-errors:inline-coroutine-body-validation, r=cjgillot 2024-03-24 01:05:51 +01:00
rustc_data_structures Auto merge of #122568 - RalfJung:mentioned-items, r=oli-obk 2024-03-21 09:01:18 +00:00
rustc_driver
rustc_driver_impl Rollup merge of #122847 - workingjubilee:suggest-rust-min-stack-workaround-on-overflow, r=TaKO8Ki 2024-03-22 11:37:02 +01:00
rustc_error_codes Auto merge of #122055 - compiler-errors:stabilize-atb, r=oli-obk 2024-03-19 00:04:09 +00:00
rustc_error_messages Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_errors Auto merge of #122754 - Mark-Simulacrum:bootstrap-bump, r=albertlarsan68 2024-03-20 13:43:41 +00:00
rustc_expand Rollup merge of #121619 - RossSmyth:pfix_match, r=petrochenkov 2024-03-22 11:36:58 +01:00
rustc_feature Rollup merge of #121619 - RossSmyth:pfix_match, r=petrochenkov 2024-03-22 11:36:58 +01:00
rustc_fluent_macro Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_fs_util
rustc_graphviz
rustc_hir Rename hir::Node::Local into hir::Node::LetStmt 2024-03-22 20:48:36 +01:00
rustc_hir_analysis Rollup merge of #121940 - veera-sivarajan:bugfix-121593, r=fmease 2024-03-23 22:59:40 -07:00
rustc_hir_pretty Rename hir::Node::Local into hir::Node::LetStmt 2024-03-22 20:48:36 +01:00
rustc_hir_typeck Rollup merge of #122780 - GuillaumeGomez:rename-hir-local, r=oli-obk 2024-03-23 15:00:18 +01:00
rustc_incremental rename items -> free_items 2024-03-21 14:27:11 +01:00
rustc_index doc: Add better explanation 2024-03-06 16:54:42 +01:00
rustc_index_macros Remove SpecOptionPartialEq 2024-03-19 16:32:01 +00:00
rustc_infer Rollup merge of #122217 - estebank:issue-119685, r=fmease 2024-03-24 01:05:51 +01:00
rustc_interface Rollup merge of #122847 - workingjubilee:suggest-rust-min-stack-workaround-on-overflow, r=TaKO8Ki 2024-03-22 11:37:02 +01:00
rustc_lexer Silence redundant error on char literal that was meant to be a string in 2021 edition 2024-03-17 23:35:19 +00:00
rustc_lint Rollup merge of #122780 - GuillaumeGomez:rename-hir-local, r=oli-obk 2024-03-23 15:00:18 +01:00
rustc_lint_defs Rollup merge of #121720 - tmandry:split-refining, r=compiler-errors 2024-03-16 23:28:47 +01:00
rustc_llvm Update the minimum external LLVM to 17 2024-03-17 10:11:04 -07:00
rustc_log rustc_log: expose tracing-tree "wraparound" in an env var 2024-03-03 12:33:26 +01:00
rustc_macros Rename diagnostic derive things. 2024-03-11 10:06:34 +11:00
rustc_metadata Auto merge of #121123 - compiler-errors:item-assumptions, r=oli-obk 2024-03-21 06:12:24 +00:00
rustc_middle Auto merge of #122629 - RalfJung:assert-unsafe-precondition, r=saethlin 2024-03-23 21:11:00 +00:00
rustc_mir_build Ty::new_ref and Ty::new_ptr stop using TypeAndMut 2024-03-22 11:13:27 -04:00
rustc_mir_dataflow refactor check_{lang,library}_ub: use a single intrinsic, put policy into library 2024-03-23 18:45:05 +01:00
rustc_mir_transform Rollup merge of #122168 - compiler-errors:inline-coroutine-body-validation, r=cjgillot 2024-03-24 01:05:51 +01:00
rustc_monomorphize Auto merge of #122852 - compiler-errors:raw-ptr, r=lcnr 2024-03-22 20:34:14 +00:00
rustc_next_trait_solver Rollup merge of #122907 - compiler-errors:uniquify-reerror, r=lcnr 2024-03-24 01:05:53 +01:00
rustc_parse Rollup merge of #122217 - estebank:issue-119685, r=fmease 2024-03-24 01:05:51 +01:00
rustc_parse_format Extend format arg help for simple tuple index access expression 2024-03-16 22:33:02 +00:00
rustc_passes Rollup merge of #122780 - GuillaumeGomez:rename-hir-local, r=oli-obk 2024-03-23 15:00:18 +01:00
rustc_pattern_analysis Programmatically convert some of the pat ctors 2024-03-22 11:13:29 -04:00
rustc_privacy Rename hir::Local into hir::LetStmt 2024-03-22 20:36:21 +01:00
rustc_query_impl Verify that query keys result in unique dep nodes 2024-03-12 05:31:41 +01:00
rustc_query_system Rollup merge of #122245 - saethlin:check-dep-graph-size, r=petrochenkov 2024-03-12 09:04:00 -07:00
rustc_resolve Don't suggest deref macro since it's unstable 2024-03-21 11:42:49 -04:00
rustc_serialize Stabilize associated type bounds 2024-03-08 20:56:25 +00:00
rustc_session -Zprint-type-sizes: print the types of awaitees and unnamed coroutine locals. 2024-03-22 18:07:15 -07:00
rustc_smir refactor check_{lang,library}_ub: use a single intrinsic, put policy into library 2024-03-23 18:45:05 +01:00
rustc_span refactor check_{lang,library}_ub: use a single intrinsic, put policy into library 2024-03-23 18:45:05 +01:00
rustc_symbol_mangling Rollup merge of #122879 - maurer:callsite-instances, r=workingjubilee 2024-03-23 22:59:42 -07:00
rustc_target Rollup merge of #121940 - veera-sivarajan:bugfix-121593, r=fmease 2024-03-23 22:59:40 -07:00
rustc_trait_selection Rollup merge of #122780 - GuillaumeGomez:rename-hir-local, r=oli-obk 2024-03-23 15:00:18 +01:00
rustc_traits Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
rustc_transmute Rollup merge of #122784 - jswrenn:tag_for_variant, r=compiler-errors 2024-03-22 20:31:29 +01:00
rustc_ty_utils -Zprint-type-sizes: print the types of awaitees and unnamed coroutine locals. 2024-03-22 18:07:15 -07:00
rustc_type_ir Programmatically convert some of the pat ctors 2024-03-22 11:13:29 -04:00
stable_mir Rollup merge of #122762 - RoboSchmied:RoboSchmied-typo, r=workingjubilee 2024-03-23 22:59:41 -07:00