rust/compiler/rustc_mir/src
bors ce0d64e03e Auto merge of #85546 - hyd-dev:unwind, r=RalfJung
const-eval: disallow unwinding across functions that `!fn_can_unwind()`

Following https://github.com/rust-lang/miri/pull/1776#discussion_r633074343, so r? `@RalfJung`

This PR turns `unwind` in `StackPopCleanup::Goto` into a new enum `StackPopUnwind`, with a `NotAllowed` variant to indicate that unwinding is not allowed. This variant is chosen based on `rustc_middle::ty::layout::fn_can_unwind()` in `eval_fn_call()` when pushing the frame. A check is added in `unwind_to_block()` to report UB if unwinding happens across a `StackPopUnwind::NotAllowed` frame.

Tested with Miri `HEAD` with [minor changes](https://github.com/rust-lang/miri/compare/HEAD..9cf3c7f0d86325a586fbcbf2acdc9232b861f1d8) and the rust-lang/miri#1776 branch with [these changes](d866c1c52f..626638fbfe).
2021-05-28 08:49:48 +00:00
..
borrow_check Replace Local::new(1) with CAPTURE_STRUCT_LOCAL 2021-05-23 18:36:23 +02:00
const_eval Auto merge of #85546 - hyd-dev:unwind, r=RalfJung 2021-05-28 08:49:48 +00:00
dataflow removed compilation error 2021-05-13 10:34:41 +05:30
interpret Auto merge of #85546 - hyd-dev:unwind, r=RalfJung 2021-05-28 08:49:48 +00:00
monomorphize emit diagnostic after post-monomorphization errors 2021-05-25 18:39:50 +02:00
transform Auto merge of #85546 - hyd-dev:unwind, r=RalfJung 2021-05-28 08:49:48 +00:00
util remove size field from Allocation 2021-05-17 13:30:16 +02:00
lib.rs remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
shim.rs Prepare mir::Constant for ty::Const only supporting valtrees 2021-03-12 12:43:54 +00:00