Skip to content

Commit 9866b09

Browse files
authoredOct 4, 2021
Rollup merge of rust-lang#89508 - jhpratt:stabilize-const_panic, r=joshtriplett
Stabilize `const_panic` Closes rust-lang#51999 FCP completed in rust-lang#89006 ```@rustbot``` label +A-const-eval +A-const-fn +T-lang cc ```@oli-obk``` for review (not `r?`'ing as not on lang team)
2 parents 3d4467d + bce8621 commit 9866b09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+100
-229
lines changed
 

‎compiler/rustc_borrowck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
#![feature(bool_to_option)]
44
#![feature(box_patterns)]
5-
#![feature(const_panic)]
5+
#![cfg_attr(bootstrap, feature(const_panic))]
66
#![feature(crate_visibility_modifier)]
77
#![feature(format_args_capture)]
88
#![feature(in_band_lifetimes)]

‎compiler/rustc_const_eval/src/transform/check_consts/check.rs

-2
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,6 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
887887

888888
// At this point, we are calling a function, `callee`, whose `DefId` is known...
889889
if is_lang_panic_fn(tcx, callee) {
890-
self.check_op(ops::Panic);
891-
892890
// `begin_panic` and `panic_display` are generic functions that accept
893891
// types other than str. Check to enforce that only str can be used in
894892
// const-eval.

0 commit comments

Comments
 (0)
Please sign in to comment.