rust/compiler
bors 2b094b1ede Auto merge of #105446 - erikdesjardins:vt-size, r=nikic
Add 0..=isize::MAX range metadata to size loads from vtables

This is the (much belated) size counterpart to #91569.

Inspired by https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Range.20metadata.20for.20.60size_of_val.60.20and.20other.20isize.3A.3AMAX.20limits. This could help optimize layout computations based on the size of a dyn trait. Though, admittedly, adding this to vtables wouldn't be as beneficial as adding it to slice len, which is used much more often.

Miri detects this UB already: b7cc99142a/compiler/rustc_const_eval/src/interpret/traits.rs (L119-L121)
(In fact Miri goes further, [assuming a 48-bit address space on 64-bit platforms](9db224fc90/compiler/rustc_abi/src/lib.rs (L312-L331)), but I don't think we can assume that in an optimization.)
2022-12-18 22:01:39 +00:00
..
rustc
rustc_abi Auto merge of #105446 - erikdesjardins:vt-size, r=nikic 2022-12-18 22:01:39 +00:00
rustc_apfloat compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_arena compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_ast more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_ast_lowering Rollup merge of #105464 - nbdd0121:hir, r=compiler-errors 2022-12-13 19:57:10 +01:00
rustc_ast_passes Allow impl ~const Trait opaque types 2022-12-15 11:26:15 +00:00
rustc_ast_pretty Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkov 2022-12-12 05:16:50 +00:00
rustc_attr
rustc_baked_icu_data
rustc_borrowck Auto merge of #105657 - oli-obk:mk_projection_ty, r=lcnr 2022-12-15 04:21:25 +00:00
rustc_builtin_macros Rollup merge of #105870 - matthiaskrgr:useless_conv, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_codegen_cranelift Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
rustc_codegen_gcc Auto merge of #105252 - bjorn3:codegen_less_pair_values, r=nagisa 2022-12-12 10:38:31 +00:00
rustc_codegen_llvm don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_codegen_ssa Auto merge of #105446 - erikdesjardins:vt-size, r=nikic 2022-12-18 22:01:39 +00:00
rustc_const_eval Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_data_structures more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_driver compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_error_codes docs: add long error explanation for error E0320 2022-12-17 07:38:23 +13:00
rustc_error_messages Resolve various merge conflicts 2022-12-17 19:08:25 +01:00
rustc_errors more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_expand don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_feature Auto merge of #102318 - Amanieu:default_alloc_error_handler, r=oli-obk 2022-12-16 21:08:45 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir minor code cleanups 2022-12-12 19:49:53 +01:00
rustc_hir_analysis Rollup merge of #105711 - compiler-errors:rpitit-references-errors, r=eholk 2022-12-17 00:45:52 +01:00
rustc_hir_pretty more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_hir_typeck don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_incremental don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_index minor code cleanups 2022-12-12 19:49:53 +01:00
rustc_infer Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_interface compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_lexer minor code cleanups 2022-12-12 19:49:53 +01:00
rustc_lint don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_lint_defs Make the test actually emit the future incompat lint 2022-12-15 16:54:00 +00:00
rustc_llvm llvm-wrapper: adapt for LLVM API changes 2022-12-11 09:14:50 +00:00
rustc_log
rustc_macros more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_metadata don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_middle Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_mir_build Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_mir_dataflow Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr 2022-12-16 12:47:49 +00:00
rustc_mir_transform Rollup merge of #105870 - matthiaskrgr:useless_conv, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_monomorphize wrap output in BufWriter 2022-12-14 20:17:52 +00:00
rustc_parse avoid .into() conversion to identical types 2022-12-18 16:20:32 +01:00
rustc_parse_format Assert size of rustc_parse_format::Piece<'_> 2022-12-08 22:50:39 +00:00
rustc_passes Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_plugin_impl
rustc_privacy Prevent the creation of TraitRef without dedicated methods 2022-12-14 15:36:39 +00:00
rustc_query_impl
rustc_query_system Auto merge of #105233 - mejrs:always_eager, r=estebank 2022-12-14 16:16:50 +00:00
rustc_resolve don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_save_analysis compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_serialize compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_session don't restuct references just to reborrow 2022-12-18 17:04:32 +01:00
rustc_smir
rustc_span Shorten trimmed display of closures 2022-12-15 11:13:44 -08:00
rustc_symbol_mangling Ensure no one constructs AliasTys themselves 2022-12-14 15:36:39 +00:00
rustc_target more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
rustc_trait_selection Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk 2022-12-18 18:57:05 +01:00
rustc_traits Ensure no one constructs AliasTys themselves 2022-12-14 15:36:39 +00:00
rustc_transmute
rustc_ty_utils Rollup merge of #105623 - compiler-errors:generator-type-size-fix, r=Nilstrieb 2022-12-15 12:46:00 +01:00
rustc_type_ir more clippy::complexity fixes 2022-12-15 00:09:10 +01:00