rust/compiler/rustc_middle/src/mir
bors c98ea0d808 Auto merge of #111769 - saethlin:ctfe-backtrace-ctrlc, r=RalfJung
Print a backtrace in const eval if interrupted

Demo:
```rust
#![feature(const_eval_limit)]
#![const_eval_limit = "0"]

const OW: u64 = {
    let mut res: u64 = 0;
    let mut i = 0;
    while i < u64::MAX {
        res = res.wrapping_add(i);
        i += 1;
    }
    res
};

fn main() {
    println!("{}", OW);
}
```
```
╭ ➜ ben@archlinux:~/rust
╰ ➤ rustc +stage1 spin.rs
^Cerror[E0080]: evaluation of constant value failed
 --> spin.rs:8:33
  |
8 |         res = res.wrapping_add(i);
  |                                 ^ Compilation was interrupted

note: erroneous constant used
  --> spin.rs:15:20
   |
15 |     println!("{}", OW);
   |                    ^^

note: erroneous constant used
  --> spin.rs:15:20
   |
15 |     println!("{}", OW);
   |                    ^^
   |
   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.
```
2024-03-26 00:04:03 +00:00
..
interpret Auto merge of #111769 - saethlin:ctfe-backtrace-ctrlc, r=RalfJung 2024-03-26 00:04:03 +00:00
basic_blocks.rs Remove deleted docs + better link together MIR traversing docs 2023-09-29 19:16:02 +00:00
consts.rs Remove unnecessary Partial/Ord impl 2024-03-21 10:04:20 +00:00
coverage.rs coverage: Clean up marker statements that aren't needed later 2024-03-22 20:20:41 +11:00
generic_graph.rs remove redundant imports 2023-12-10 10:56:22 +08:00
generic_graphviz.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
graphviz.rs remove redundant imports 2023-12-10 10:56:22 +08:00
mod.rs refactor check_{lang,library}_ub: use a single intrinsic, put policy into library 2024-03-23 18:45:05 +01:00
mono.rs Auto merge of #120931 - chenyukang:yukang-cleanup-hashmap, r=michaelwoerister 2024-02-15 12:36:37 +00:00
patch.rs Update MIR with MirPatch in UninhabitedEnumBranching 2024-03-08 08:15:14 +08:00
pretty.rs Rollup merge of #122937 - Zalathar:unbox, r=oli-obk 2024-03-24 17:08:16 +01:00
query.rs Stop ConstraintCategory Ord impl from relying on Ty's Ord impl. 2024-03-21 10:45:30 +00:00
statement.rs ctfe interpreter: extend provenance so that it can track whether a pointer is immutable 2023-12-07 17:46:36 +01:00
syntax.rs Rollup merge of #122937 - Zalathar:unbox, r=oli-obk 2024-03-24 17:08:16 +01:00
tcx.rs refactor check_{lang,library}_ub: use a single intrinsic, put policy into library 2024-03-23 18:45:05 +01:00
terminator.rs Rename IntoDiagnosticArg as IntoDiagArg. 2024-03-11 09:12:19 +11:00
traversal.rs Avoid lowering code under dead SwitchInt targets 2024-03-12 19:01:04 -04:00
type_foldable.rs Make DefiningAnchor::Bind only store the opaque types that may be constrained, instead of the current infcx root item. 2024-03-11 17:19:37 +00:00
visit.rs Unbox and unwrap the contents of StatementKind::Coverage 2024-03-23 22:05:11 +11:00