File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ impl<'tcx> TyCtxt<'tcx> {
40
40
/// for being called from stable `const fn`s (`min_const_fn`).
41
41
///
42
42
/// Adding more intrinsics requires sign-off from @rust-lang/lang.
43
+ ///
44
+ /// This list differs from the list in `is_const_intrinsic` in the sense that any item on this
45
+ /// list must be on the `is_const_intrinsic` list, too, because if an intrinsic is callable from
46
+ /// stable, it must be callable at all.
43
47
fn is_intrinsic_min_const_fn ( self , def_id : DefId ) -> bool {
44
48
match self . item_name ( def_id) {
45
49
| sym:: size_of
@@ -108,6 +112,11 @@ pub fn provide(providers: &mut Providers<'_>) {
108
112
match tcx. item_name ( def_id) {
109
113
// Keep this list in the same order as the match patterns in
110
114
// `librustc_mir/interpret/intrinsics.rs`
115
+
116
+ // This whitelist is a list of intrinsics that have a miri-engine implementation
117
+ // and can thus be called when enabling enough feature gates. The similar
118
+ // whitelist in `is_intrinsic_min_const_fn` (in this file), exists for allowing
119
+ // the intrinsics to be transitively called by stable const fns.
111
120
| sym:: caller_location
112
121
113
122
| sym:: min_align_of
You can’t perform that action at this time.
0 commit comments