rust/compiler
bors 4a7fb971c9 Auto merge of #91569 - erikdesjardins:vt-align, r=nikic
Attach range metadata to alignment loads from vtables

...because alignment is always nonzero[0].

This helps eliminate redundant runtime alignment checks, when a DST
is a field of a struct whose remaining fields have alignment 1.

Fixes #91438.

---
[0]:

The [reference](https://doc.rust-lang.org/reference/type-layout.html) says that alignment must be at least 1.

And in practice, the alignment field for all vtables is generated here: 772d51f887/compiler/rustc_middle/src/ty/vtable.rs (L68-L90) and is nonzero because [`Align::bytes()`](772d51f887/compiler/rustc_target/src/abi/mod.rs (L547-L549)) is always nonzero.
2021-12-13 04:29:20 +00:00
..
rustc Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_apfloat Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
rustc_arena Add some comments. 2021-11-19 07:52:59 +11:00
rustc_ast Auto merge of #90207 - BoxyUwU:stabilise_cg_defaults, r=lcnr 2021-12-12 14:24:23 +00:00
rustc_ast_lowering Rollup merge of #91643 - Amanieu:r9x18, r=joshtriplett 2021-12-11 23:31:49 +01:00
rustc_ast_passes Auto merge of #90207 - BoxyUwU:stabilise_cg_defaults, r=lcnr 2021-12-12 14:24:23 +00:00
rustc_ast_pretty Rollup merge of #91625 - est31:remove_indexes, r=oli-obk 2021-12-10 22:40:36 +01:00
rustc_attr re-format with new rustfmt 2021-11-30 13:08:41 -05:00
rustc_borrowck Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk" 2021-12-12 12:34:46 +08:00
rustc_builtin_macros Rollup merge of #91625 - est31:remove_indexes, r=oli-obk 2021-12-10 22:40:36 +01:00
rustc_codegen_cranelift Use IntoIterator for array impl everywhere. 2021-12-04 19:40:33 +01:00
rustc_codegen_gcc Rollup merge of #91625 - est31:remove_indexes, r=oli-obk 2021-12-10 22:40:36 +01:00
rustc_codegen_llvm Auto merge of #90716 - euclio:libloading, r=cjgillot 2021-12-12 17:28:52 +00:00
rustc_codegen_ssa Auto merge of #91569 - erikdesjardins:vt-align, r=nikic 2021-12-13 04:29:20 +00:00
rustc_const_eval Auto merge of #91549 - fee1-dead:const_env, r=spastorino 2021-12-12 22:15:32 +00:00
rustc_data_structures Auto merge of #91549 - fee1-dead:const_env, r=spastorino 2021-12-12 22:15:32 +00:00
rustc_driver add rustc option for using LLVM stack smash protection 2021-11-22 20:06:22 +01:00
rustc_error_codes Clarify and tidy up explanation of E0038 2021-11-30 09:25:17 -08:00
rustc_errors Rollup merge of #91394 - Mark-Simulacrum:bump-stage0, r=pietroalbini 2021-12-02 15:52:03 +01:00
rustc_expand Remove redundant [..]s 2021-12-09 00:01:29 +01:00
rustc_feature update accepted feature gate 2021-12-11 00:12:57 +00:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz Remove redundant [..]s 2021-12-09 00:01:29 +01:00
rustc_hir Auto merge of #91549 - fee1-dead:const_env, r=spastorino 2021-12-12 22:15:32 +00:00
rustc_hir_pretty Rollup merge of #91625 - est31:remove_indexes, r=oli-obk 2021-12-10 22:40:36 +01:00
rustc_incremental Rollup merge of #91625 - est31:remove_indexes, r=oli-obk 2021-12-10 22:40:36 +01:00
rustc_index Auto merge of #90491 - Mark-Simulacrum:push-pred-faster, r=matthewjasper 2021-11-24 15:51:46 +00:00
rustc_infer Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk" 2021-12-12 12:34:46 +08:00
rustc_interface Auto merge of #90716 - euclio:libloading, r=cjgillot 2021-12-12 17:28:52 +00:00
rustc_lexer Auto merge of #91393 - Julian-Wollersberger:lexer_optimization, r=petrochenkov 2021-12-03 13:20:14 +00:00
rustc_lint Remove useless variant. 2021-12-11 11:08:46 +01:00
rustc_lint_defs Remove useless variant. 2021-12-11 11:08:46 +01:00
rustc_llvm Auto merge of #91284 - t6:freebsd-riscv64, r=Amanieu 2021-12-06 03:51:05 +00:00
rustc_macros Query modifier 2021-12-12 12:35:00 +08:00
rustc_metadata Auto merge of #90716 - euclio:libloading, r=cjgillot 2021-12-12 17:28:52 +00:00
rustc_middle Auto merge of #91549 - fee1-dead:const_env, r=spastorino 2021-12-12 22:15:32 +00:00
rustc_mir_build Evaluate inline const pat early and report error if too generic 2021-12-05 21:38:37 +00:00
rustc_mir_dataflow Auto merge of #91475 - ecstatic-morse:mir-pass-manager3, r=oli-obk 2021-12-05 03:41:18 +00:00
rustc_mir_transform give more help in the unaligned_references lint 2021-12-09 16:48:51 -05:00
rustc_monomorphize Rollup merge of #90701 - michaelwoerister:more-artifact-sizes, r=davidtwco 2021-11-09 19:00:45 +01:00
rustc_parse Auto merge of #90207 - BoxyUwU:stabilise_cg_defaults, r=lcnr 2021-12-12 14:24:23 +00:00
rustc_parse_format Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_passes Update invalid crate attributes, add help message 2021-12-03 18:38:32 +00:00
rustc_plugin_impl replace dynamic library module with libloading 2021-12-06 12:03:47 -05:00
rustc_privacy Take a LocalDefId in expect_*item. 2021-11-28 21:09:45 +01:00
rustc_query_impl Query modifier 2021-12-12 12:35:00 +08:00
rustc_query_system std: Stabilize the thread_local_const_init feature 2021-11-29 07:23:46 -08:00
rustc_resolve Rollup merge of #91764 - cjgillot:elide-anyway, r=jackh726 2021-12-11 23:31:52 +01:00
rustc_save_analysis Give inline const separate DefKind 2021-11-07 03:59:06 +00:00
rustc_serialize avoid string validation in rustc_serialize, check a marker byte instead 2021-12-06 18:43:01 +01:00
rustc_session Remove redundant [..]s 2021-12-09 00:01:29 +01:00
rustc_span Rollup merge of #91625 - est31:remove_indexes, r=oli-obk 2021-12-10 22:40:36 +01:00
rustc_symbol_mangling Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
rustc_target asm: Allow using r9 (ARM) and x18 (AArch64) if they are not reserved by 2021-12-10 00:51:39 +00:00
rustc_trait_selection Auto merge of #91549 - fee1-dead:const_env, r=spastorino 2021-12-12 22:15:32 +00:00
rustc_traits Reduce boilerplate around infallible folders 2021-12-02 16:14:16 +00:00
rustc_ty_utils Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk" 2021-12-12 12:34:46 +08:00
rustc_type_ir Add two inline annotations for hot functions 2021-10-03 12:43:43 -04:00
rustc_typeck Auto merge of #91549 - fee1-dead:const_env, r=spastorino 2021-12-12 22:15:32 +00:00