about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/diagnostics/find_use.rs
AgeCommit message (Collapse)AuthorLines
2025-02-19Remove `MirVisitable`.Nicholas Nethercote-16/+18
The `MirVisitable` trait is just a complicated way to visit either a statement or a terminator. (And its impl for `Terminator` is unused.) It has a single use. This commit removes it, replacing it with an if/else, which is shorter and simpler.
2024-10-04Use `Rc` less in `MirBorrowckCtxt`.Nicholas Nethercote-3/+2
The `regioncx` and `borrow_set` fields can be references instead of `Rc`. They use the existing `'a` lifetime. This avoids some heap allocations and is a bit simpler.
2024-09-13Rename and reorder lots of lifetimes.Nicholas Nethercote-7/+7
- Replace non-standard names like 's, 'p, 'rg, 'ck, 'parent, 'this, and 'me with vanilla 'a. These are cases where the original name isn't really any more informative than 'a. - Replace names like 'cx, 'mir, and 'body with vanilla 'a when the lifetime applies to multiple fields and so the original lifetime name isn't really accurate. - Put 'tcx last in lifetime lists, and 'a before 'b.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-4/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-02-06Invert diagnostic lints.Nicholas Nethercote-3/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2023-04-13Remove `ToRegionVid`.Nicholas Nethercote-2/+1
It is only implemented for `Region`, where it is equivalent to the inherent `as_var` method.
2023-04-06Refactor unwind from Option to a new enumGary Guo-2/+5
2023-03-05Remove `allow(potential_query_instability)` from `borrowck`clubby789-2/+2
2022-11-09lint auto passAndyJado-0/+3
Revert "lint auto pass" This reverts commit e58e4466384924c491a932d3f18ef50ffa5a5065.
2022-07-01cleanup mir visitor for `rustc::pass_by_value`lcnr-1/+1
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-1/+1
2022-05-17Change `Successors` to `impl Iterator<Item = BasicBlock>`SparrowLii-2/+2
2021-09-07Move rustc_mir::borrow_check to new crate rustc_borrowck.Camille GILLOT-0/+128