Skip to content

Commit

Permalink
Updated rustc version + misc bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FractalFir committed Dec 17, 2024
1 parent 1f0d0df commit 37c05b3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/basic_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn simplify_handler<'tcx>(
} => {
let ty = crate::utilis::monomorphize(method_instance, place.ty(method, tcx).ty, tcx);

let drop_instance = Instance::resolve_drop_in_place(tcx, ty).polymorphize(tcx);
let drop_instance = Instance::resolve_drop_in_place(tcx, ty);
if let InstanceKind::DropGlue(_, None) = drop_instance.def {
//Empty drop, nothing needs to happen.
simplify_handler(Some(target.as_u32()), blocks, tcx, method_instance, method)
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,11 @@ impl CodegenBackend for MyBackend {
sess: &Session,
codegen_results: CodegenResults,
outputs: &OutputFilenames,
) -> Result<(), ErrorGuaranteed> {
) {
use rustc_codegen_ssa::back::link::link_binary;
//panic!();
link_binary(sess, &RlibArchiveBuilder, codegen_results, outputs)
.expect("Could not link the binary into a .rlib file!");
Ok(())

}
}
// Inspired by cranelifts glue code. Is responsible for turing the files produced by teh backend into
Expand Down
2 changes: 1 addition & 1 deletion src/rvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub fn handle_rvalue<'tcx>(
args,
rustc_middle::ty::ClosureKind::FnOnce,
)
.polymorphize(ctx.tcx());
;
let call_info = CallInfo::sig_from_instance_(instance, ctx);

let function_name = crate::utilis::function_name(ctx.tcx().symbol_name(instance));
Expand Down
2 changes: 1 addition & 1 deletion src/terminator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub fn handle_terminator<'tcx>(
let ty = ctx.monomorphize(place.ty(ctx.body(), ctx.tcx()).ty);

let drop_instance =
Instance::resolve_drop_in_place(ctx.tcx(), ty).polymorphize(ctx.tcx());
Instance::resolve_drop_in_place(ctx.tcx(), ty);
if let InstanceKind::DropGlue(_, None) = drop_instance.def {
//Empty drop, nothing needs to happen.
vec![CILRoot::GoTo {
Expand Down
1 change: 1 addition & 0 deletions test/arthm/num_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fn check_float_nan() {
test_eq!((-9.0_f32).max(f32::NAN), -9.0);
//test_eq!((-9.0_f64).max(f64::NAN), -9.0);
}
#[allow(unpredictable_function_pointer_comparisons)]
pub fn test_variadic_fnptr() {
extern "C" {
// This needs to use the correct function signature even though it isn't called as some
Expand Down
3 changes: 3 additions & 0 deletions test/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ macro_rules! test {
(),
u32,
>(line!());
#[allow(unused_unsafe)]
unsafe { core::intrinsics::breakpoint() };
core::intrinsics::abort();
}
Expand All @@ -65,6 +66,7 @@ macro_rules! test_eq {
(),
u32,
>(line!());
#[allow(unused_unsafe)]
unsafe { core::intrinsics::breakpoint() };
core::intrinsics::abort();
}
Expand All @@ -86,6 +88,7 @@ macro_rules! test_ne {
(),
u32,
>(line!());
#[allow(unused_unsafe)]
unsafe { core::intrinsics::breakpoint() };
core::intrinsics::abort();
}
Expand Down

0 comments on commit 37c05b3

Please sign in to comment.