Skip to content

Commit d890b26

Browse files
committed
Improve the ICE message for invalid nullary intrinsic calls
1 parent 79966ae commit d890b26

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_codegen_ssa/src/mir/intrinsic.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
120120
| sym::atomic_singlethreadfence
121121
| sym::caller_location => {}
122122
_ => {
123-
span_bug!(span, "nullary intrinsic {name} must either be in a const block or explicitly opted out because it is inherently a runtime intrinsic
124-
");
123+
span_bug!(span, "Nullary intrinsic {name} must be called in a const block. If you are adding a new nullary intrinsic that is inherently a runtime intrinsic, update this check.");
125124
}
126125
}
127126
}

0 commit comments

Comments
 (0)