Skip to content

Commit dff98a8

Browse files
committed
remove pointless cold_path impl in interpreter
1 parent 3fb7e44 commit dff98a8

File tree

2 files changed

+1
-3
lines changed
  • compiler

2 files changed

+1
-3
lines changed

compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
12641264

12651265
sym::cold_path => {
12661266
// This is a no-op. The intrinsic is just a hint to the optimizer.
1267+
// We still have an impl here to avoid it being turned into a call.
12671268
}
12681269

12691270
// Unimplemented intrinsics must have a fallback body. The fallback body is obtained

compiler/rustc_const_eval/src/interpret/intrinsics.rs

-3
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
417417
// These just return their argument
418418
self.copy_op(&args[0], dest)?;
419419
}
420-
sym::cold_path => {
421-
// This is a no-op. The intrinsic is just a hint to the optimizer.
422-
}
423420
sym::raw_eq => {
424421
let result = self.raw_eq_intrinsic(&args[0], &args[1])?;
425422
self.write_scalar(result, dest)?;

0 commit comments

Comments
 (0)