Skip to content

Commit bfec56b

Browse files
authored
Rollup merge of rust-lang#150791 - w/mismatch, r=jieyouxu
Remove out of date FIXME comment. Commit rust-lang#147526 removed the following code and replaced it with the `AllocatorMethod`. However, its input is empty, resulting in behavior inconsistent with the previous code. ```rust create_wrapper_function( tcx, &cx, &mangle_internal_symbol(tcx, "__rust_alloc_error_handler"), Some(&mangle_internal_symbol(tcx, alloc_error_handler_name(alloc_error_handler_kind))), &[usize, usize], // size, align None, true, &CodegenFnAttrs::new(), ); ``` resolves rust-lang#150755
2 parents e821731 + f02ed7b commit bfec56b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • compiler/rustc_codegen_ssa/src

compiler/rustc_codegen_ssa/src/base.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use std::time::{Duration, Instant};
66
use itertools::Itertools;
77
use rustc_abi::FIRST_VARIANT;
88
use rustc_ast::expand::allocator::{
9-
ALLOC_ERROR_HANDLER, ALLOCATOR_METHODS, AllocatorKind, AllocatorMethod, AllocatorTy,
9+
ALLOC_ERROR_HANDLER, ALLOCATOR_METHODS, AllocatorKind, AllocatorMethod, AllocatorMethodInput,
10+
AllocatorTy,
1011
};
1112
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
1213
use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry};
@@ -671,7 +672,7 @@ pub fn allocator_shim_contents(tcx: TyCtxt<'_>, kind: AllocatorKind) -> Vec<Allo
671672
methods.push(AllocatorMethod {
672673
name: ALLOC_ERROR_HANDLER,
673674
special: None,
674-
inputs: &[],
675+
inputs: &[AllocatorMethodInput { name: "layout", ty: AllocatorTy::Layout }],
675676
output: AllocatorTy::Never,
676677
});
677678
}

0 commit comments

Comments
 (0)