2023-10-16 17:36:39 +00:00
|
|
|
// skip-filecheck
|
2023-04-30 14:53:24 +00:00
|
|
|
// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
|
2023-05-17 20:26:11 +00:00
|
|
|
// needs-unwind
|
2023-05-21 07:57:26 +00:00
|
|
|
// only-x86_64
|
2023-04-30 14:53:24 +00:00
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#![feature(step_trait)]
|
|
|
|
|
|
|
|
// EMIT_MIR checked_ops.step_forward.PreCodegen.after.mir
|
|
|
|
pub fn step_forward(x: u32, n: usize) -> u32 {
|
|
|
|
std::iter::Step::forward(x, n)
|
|
|
|
}
|
|
|
|
|
|
|
|
// EMIT_MIR checked_ops.checked_shl.PreCodegen.after.mir
|
|
|
|
pub fn checked_shl(x: u32, rhs: u32) -> Option<u32> {
|
|
|
|
x.checked_shl(rhs)
|
|
|
|
}
|