fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
757 B28 linesraw
1   LL|       |// Regression test for issue #98833.
2   LL|       |// compile-flags: -Zinline-mir -Cdebug-assertions=off
3   LL|       |
4   LL|      1|fn main() {
5   LL|      1|    println!("{}", live::<false>());
6   LL|      1|
7   LL|      1|    let f = |x: bool| {
8   LL|       |        debug_assert!(
9   LL|      0|            x
10   LL|       |        );
11   LL|      1|    };
12   LL|      1|    f(false);
13   LL|      1|}
14   LL|       |
15   LL|       |#[inline]
16   LL|      1|fn live<const B: bool>() -> u32 {
17   LL|      1|    if B {
18   LL|      0|        dead()
19   LL|       |    } else {
20   LL|      1|        0
21   LL|       |    }
22   LL|      1|}
23   LL|       |
24   LL|       |#[inline]
25   LL|      0|fn dead() -> u32 {
26   LL|      0|    42
27   LL|      0|}
28