Skip to content

Commit 92386e8

Browse files
Remove if/loop tests from min_const_fn
These errors will be triggered before the MIR const-checker runs, causing all other errors to be silenced. They are now checked in the `const-{if,loop}` tests.
1 parent 267733b commit 92386e8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/test/ui/consts/min_const_fn/min_const_fn.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ const fn foo30_2(x: *mut u32) -> usize { x as usize }
9797
//~^ ERROR casting pointers to ints is unstable
9898
const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
9999
//~^ ERROR casting pointers to ints is unstable
100-
const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } }
101-
//~^ ERROR loops and conditional expressions are not stable in const fn
102-
const fn foo30_5(b: bool) { while b { } }
103-
//~^ ERROR loops are not allowed in const fn
104100
const fn foo30_6() -> bool { let x = true; x }
105101
const fn foo36(a: bool, b: bool) -> bool { a && b }
106102
//~^ ERROR loops and conditional expressions are not stable in const fn

0 commit comments

Comments
 (0)