about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir/patch.rs
AgeCommit message (Collapse)AuthorLines
2025-02-14Move `MirPatch` from `rustc_middle` to `rustc_mir_transform`.Nicholas Nethercote-258/+0
Because it's only used in `rustc_mir_transform`. (Presumably it is currently in `rustc_middle` because lots of other MIR-related stuff is, but that's not a hard requirement.) And because `rustc_middle` is huge and it's always good to make it smaller.
2025-02-11Simplify intra-crate qualifiers.Nicholas Nethercote-1/+2
The following is a weird pattern for a file within `rustc_middle`: ``` use rustc_middle::aaa; use crate::bbb; ``` More sensible and standard would be this: ``` use crate::{aaa, bbb}; ``` I.e. we generally prefer using `crate::` to using a crate's own name. (Exceptions are things like in macros where `crate::` doesn't work because the macro is used in multiple crates.) This commit fixes a bunch of these weird qualifiers.
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_middle`.Nicholas Nethercote-0/+1
2024-03-08Update MIR with `MirPatch` in `UninhabitedEnumBranching`DianQK-2/+25
2023-12-10remove redundant importssurechen-3/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-10-13Format all the let chains in compilerMichael Goulet-1/+3
2023-10-04Remove mir::LocalDecl::internal.Camille GILLOT-9/+2
2023-08-24cache the terminate block with the last reason that we sawRalf Jung-13/+9
2023-08-24when terminating during unwinding, show the reason whyRalf Jung-10/+19
2023-08-20give some unwind-related terminators a more clear nameRalf Jung-4/+4
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-04-09Remove identity castsNilstrieb-3/+3
2023-04-06Address review feedbackGary Guo-7/+10
2023-04-06Rename `Abort` terminator to `Terminate`Gary Guo-1/+47
Unify terminology used in unwind action and terminator, and reflect the fact that a nounwind panic is triggered instead of an immediate abort is triggered for this terminator.
2023-04-06Add `UnwindAction::Terminate`Gary Guo-0/+2
2023-04-06Add `UnwindAction::Unreachable`Gary Guo-1/+4
This also makes eval machine's `StackPopUnwind` redundant so that is replaced.
2023-03-14Wrap the whole LocalInfo in ClearCrossCrate.Camille GILLOT-2/+2
2022-08-26Replace `Body::basic_blocks()` with field accessTomasz Miąsko-5/+5
2022-08-23Remove support for adding statement to all successorsTomasz Miąsko-17/+0
This feature of MIR patch system is no longer used.
2022-08-23Elide storage markers when elaborating deref projectionsTomasz Miąsko-3/+6
2022-08-02Avoid invalidating the CFG in MirPatch.Jakob Degen-35/+30
As a part of this change, we adjust MirPatch to not needlessly create unnecessary resume blocks.
2022-05-26clippy::complexity fixesMatthias Krüger-2/+1
clone_on_copy useless_format bind_instead_of_map filter_map_identity useless_conversion map_flatten unnecessary_unwrap
2022-05-22Lifetime variance fixes for rustcMichael Goulet-1/+1
2022-05-17Change `Successors` to `impl Iterator<Item = BasicBlock>`SparrowLii-3/+1
2022-05-01re-name stuffouz-a-6/+8
2022-04-29exp-stuff-dirtyouz-a-0/+9
2022-04-18replace iter with into_iter()ouz-a-2/+2
2022-04-17fat vecouz-a-7/+5
2022-04-17format errouz-a-5/+3
2022-04-17little changesouz-a-7/+5
2022-04-16Make derefer work everwhereouz-a-0/+26
Co-Authored-By: Oli Scherer <332036+oli-obk@users.noreply.github.com>
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-0/+173