I tried this code: ```rust #[inline(never)] pub const fn f(n: u8) { assert!(n >= 4); assert!(2 <= n.isqrt()); } ``` > [!note] > I've tried: > - removing `const` > - replacing `u8` by `usize` > - replacing `4` by `9` and `2` by `3` > > Outcome was the same I expected to see this happen: 2nd assertion non-existent in assembly. Instead, this happened: ```asm # ... (snip) .LBB0_4: leaq .L__unnamed_4(%rip), %rdi leaq .L__unnamed_5(%rip), %rdx movl $32, %esi callq *core::panicking::panic@GOTPCREL(%rip) # ... .L__unnamed_4: .ascii "assertion failed: 2 <= n.isqrt()" # ... ``` ### Meta [Playground](https://play.rust-lang.org/?version=nightly&mode=release&edition=2024&gist=1ace1f411cb80a044a15835fbdb4f2df) `rustc --version --verbose`: ``` 1.84.0-nightly (2024-11-06 8549802939cd01111c46) ``` _No Backtrace_ @rustbot label: +I-slow, -C-bug
I tried this code:
Note
I've tried:
constu8byusize4by9and2by3Outcome was the same
I expected to see this happen: 2nd assertion non-existent in assembly.
Instead, this happened:
Meta
Playground
rustc --version --verbose:No Backtrace
@rustbot label: +I-slow, -C-bug