rust/compiler
Matthias Krüger 1ea9951b43
Rollup merge of #114550 - dtolnay:globalalloc, r=compiler-errors
Generate better function argument names in global_allocator expansion

Generated code for `#[global_allocator] static ALLOCATOR: Allocator = Allocator;`—

**Before:**

```rust
const _: () = {
    #[rustc_std_internal_symbol]
    unsafe fn __rust_alloc(arg0: usize, arg1: usize) -> *mut u8 {
        ::core::alloc::GlobalAlloc::alloc(
            &ALLOCATOR,
            ::core::alloc::Layout::from_size_align_unchecked(arg0, arg1),
        )
    }
    #[rustc_std_internal_symbol]
    unsafe fn __rust_dealloc(arg0: *mut u8, arg1: usize, arg2: usize) -> () {
        ::core::alloc::GlobalAlloc::dealloc(
            &ALLOCATOR,
            arg0,
            ::core::alloc::Layout::from_size_align_unchecked(arg1, arg2),
        )
    }
    #[rustc_std_internal_symbol]
    unsafe fn __rust_realloc(
        arg0: *mut u8,
        arg1: usize,
        arg2: usize,
        arg3: usize,
    ) -> *mut u8 {
        ::core::alloc::GlobalAlloc::realloc(
            &ALLOCATOR,
            arg0,
            ::core::alloc::Layout::from_size_align_unchecked(arg1, arg2),
            arg3,
        )
    }
    #[rustc_std_internal_symbol]
    unsafe fn __rust_alloc_zeroed(arg0: usize, arg1: usize) -> *mut u8 {
        ::core::alloc::GlobalAlloc::alloc_zeroed(
            &ALLOCATOR,
            ::core::alloc::Layout::from_size_align_unchecked(arg0, arg1),
        )
    }
};
```

**After:**

```rust
const _: () = {
    #[rustc_std_internal_symbol]
    unsafe fn __rust_alloc(size: usize, align: usize) -> *mut u8 {
        ::core::alloc::GlobalAlloc::alloc(
            &ALLOCATOR,
            ::core::alloc::Layout::from_size_align_unchecked(size, align),
        )
    }
    #[rustc_std_internal_symbol]
    unsafe fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize) -> () {
        ::core::alloc::GlobalAlloc::dealloc(
            &ALLOCATOR,
            ptr,
            ::core::alloc::Layout::from_size_align_unchecked(size, align),
        )
    }
    #[rustc_std_internal_symbol]
    unsafe fn __rust_realloc(
        ptr: *mut u8,
        size: usize,
        align: usize,
        new_size: usize,
    ) -> *mut u8 {
        ::core::alloc::GlobalAlloc::realloc(
            &ALLOCATOR,
            ptr,
            ::core::alloc::Layout::from_size_align_unchecked(size, align),
            new_size,
        )
    }
    #[rustc_std_internal_symbol]
    unsafe fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8 {
        ::core::alloc::GlobalAlloc::alloc_zeroed(
            &ALLOCATOR,
            ::core::alloc::Layout::from_size_align_unchecked(size, align),
        )
    }
};
```
2023-08-07 00:06:07 +02:00
..
rustc inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_abi Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_arena Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_ast Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
rustc_ast_lowering Consolidate opaque ty and async fn lowering code 2023-08-05 16:53:13 +00:00
rustc_ast_passes inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_ast_pretty Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_attr [rustc_attr][nit] Replace filter + is_some with map_or. 2023-08-01 12:39:32 -07:00
rustc_baked_icu_data
rustc_borrowck Rollup merge of #114477 - estebank:arc-clone, r=compiler-errors 2023-08-04 21:32:00 +02:00
rustc_builtin_macros Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
rustc_codegen_cranelift Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
rustc_codegen_gcc Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
rustc_codegen_llvm Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
rustc_codegen_ssa Rollup merge of #114505 - ouz-a:cleanup_mir, r=RalfJung 2023-08-06 17:26:29 +02:00
rustc_const_eval Rollup merge of #114542 - RalfJung:const-prop-nonsense, r=compiler-errors 2023-08-07 00:06:06 +02:00
rustc_data_structures Rollup merge of #114418 - klensy:parking_lot, r=oli-obk 2023-08-04 21:31:56 +02:00
rustc_driver
rustc_driver_impl Auto merge of #114476 - Urgau:missing-dep-file-112898, r=oli-obk 2023-08-06 00:04:52 +00:00
rustc_error_codes Auto merge of #109348 - cjgillot:issue-109146, r=petrochenkov 2023-08-05 11:52:07 +00:00
rustc_error_messages Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_errors Auto merge of #114104 - oli-obk:syn2, r=compiler-errors 2023-08-04 18:46:19 +00:00
rustc_expand Auto merge of #114104 - oli-obk:syn2, r=compiler-errors 2023-08-04 18:46:19 +00:00
rustc_feature Auto merge of #112117 - bryangarza:track-caller-feature-gate, r=compiler-errors 2023-08-04 22:17:59 +00:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Consolidate opaque ty and async fn lowering code 2023-08-05 16:53:13 +00:00
rustc_hir_analysis Consolidate opaque ty and async fn lowering code 2023-08-05 16:53:13 +00:00
rustc_hir_pretty Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_hir_typeck Rollup merge of #114461 - sebastiantoh:issue-114423, r=estebank 2023-08-04 21:31:58 +02:00
rustc_incremental Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_index Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_infer don't replace opaque types under binders with infer vars 2023-08-06 12:08:32 +00:00
rustc_interface Make MissingDoc a module lint. 2023-08-04 16:09:14 +00:00
rustc_lexer Update lexer emoji diagnostics to Unicode 15.0 2023-07-29 08:47:21 +08:00
rustc_lint Rollup merge of #114486 - Urgau:const-context-nan-suggestion-114471, r=compiler-errors 2023-08-06 03:56:09 +02:00
rustc_lint_defs Auto merge of #114414 - cjgillot:early-unnameable-test, r=petrochenkov 2023-08-04 14:13:11 +00:00
rustc_llvm Auto merge of #113339 - lqd:respect-filters, r=tmiasko 2023-08-01 23:15:20 +00:00
rustc_log inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_macros Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_metadata Rollup merge of #114253 - fmease:compute-variances-for-lazy-ty-aliases, r=oli-obk 2023-08-04 09:18:58 +02:00
rustc_middle Auto merge of #114553 - matthiaskrgr:rollup-5yddunv, r=matthiaskrgr 2023-08-06 19:46:31 +00:00
rustc_mir_build Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_mir_dataflow Rollup merge of #114505 - ouz-a:cleanup_mir, r=RalfJung 2023-08-06 17:26:29 +02:00
rustc_mir_transform Rollup merge of #114505 - ouz-a:cleanup_mir, r=RalfJung 2023-08-06 17:26:29 +02:00
rustc_monomorphize avoid 'miri' when refering to the shared interpreter 2023-08-02 16:52:03 +02:00
rustc_parse Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_parse_format
rustc_passes Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_plugin_impl
rustc_privacy Remove constness from TraitPredicate 2023-08-02 15:38:00 +00:00
rustc_query_impl Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_query_system replace few explicit use of parking_lot with rustc_data_structures::sync onces 2023-08-04 18:41:56 +03:00
rustc_resolve Auto merge of #114487 - compiler-errors:opaques-refactoring-idk, r=cjgillot 2023-08-06 11:16:31 +00:00
rustc_serialize
rustc_session Auto merge of #114104 - oli-obk:syn2, r=compiler-errors 2023-08-04 18:46:19 +00:00
rustc_smir Add alocation to smir 2023-08-06 15:06:04 +03:00
rustc_span Auto merge of #112117 - bryangarza:track-caller-feature-gate, r=compiler-errors 2023-08-04 22:17:59 +00:00
rustc_symbol_mangling avoid 'miri' when refering to the shared interpreter 2023-08-02 16:52:03 +02:00
rustc_target Auto merge of #98333 - SimonSapin:riscv-atomic, r=Amanieu 2023-08-05 01:53:32 +00:00
rustc_trait_selection Also report when goals go from ok to error 2023-08-05 20:09:31 +00:00
rustc_traits
rustc_transmute Don't attempt to compute layout of type referencing error 2023-07-27 18:24:08 +00:00
rustc_ty_utils Rollup merge of #114079 - compiler-errors:closure-upvars, r=oli-obk 2023-08-02 13:46:54 +02:00
rustc_type_ir Rollup merge of #114355 - compiler-errors:resolve_vars_early, r=lcnr 2023-08-04 09:18:59 +02:00