File tree 1 file changed +4
-11
lines changed
1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -336,14 +336,7 @@ It would be possible to allow the syntax `const expr` for an inline `const` that
336
336
consists of a single expression. This is analagous to the single expression
337
337
variant of closures: ` || 42 ` . This is backwards compatible with the current proposal.
338
338
339
- Eventually, I would like to try making any expression that could possibly panic
340
- ineligible for implicit promotion. This includes * all* ` const fn ` calls as well
341
- as all arithmetic expressions (e.g., ` &(0u32 - 1) ` ), which currently work due
342
- to [ the way MIR is lowered] [ arith-assert ] . Even though bitwise operators can
343
- never panic, I would also stop promoting them to be consistent. This would
344
- have to be done at an edition boundary. We would only do promotion for
345
- aggregates, literals, constants and combinations thereof (** @RalfJung ** notes
346
- that this is the subset of the language valid in patterns), and
347
- ` #[rustc_promotable] ` would be ignored by later editions of the compiler.
348
-
349
- [ arith-assert ] : https://github.com/rust-lang/const-eval/issues/19#issuecomment-447052258
339
+ At some point (an edition boundary?), we may want to narrow the scope of
340
+ expressions that are eligible for implicit promotion. Inline ` const `
341
+ expressions would be the recommended replacement for expressions that were no
342
+ longer eligible.
You can’t perform that action at this time.
0 commit comments