rust/compiler/rustc_session/src
bors 3cdd0197e7 Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk
Use stable metric for const eval limit instead of current terminator-based logic

This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only.

The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made).

Also see: #103877
2023-01-29 04:11:27 +00:00
..
config Change process spawning to inherit the parent's signal mask by default 2022-10-20 14:53:38 -07:00
cgu_reuse_tracker.rs Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
code_stats.rs Properly print generator interior type sizes 2022-12-07 18:33:26 +00:00
config.rs Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett 2023-01-27 12:57:54 +09:00
cstore.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
errors.rs Print correct base for too-large literals 2023-01-02 11:43:07 +00:00
filesearch.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
lib.rs remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
options.rs Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk 2023-01-29 04:11:27 +00:00
output.rs Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov 2023-01-19 05:23:40 +00:00
parse.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
search_paths.rs incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it. 2022-04-19 10:43:20 +02:00
session.rs Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov 2023-01-19 05:23:40 +00:00
utils.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00