about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/borrow_set.rs
AgeCommit message (Collapse)AuthorLines
2025-01-11rename `BitSet` to `DenseBitSet`Rémy Rakic-4/+5
This should make it clearer that this bitset is dense, with the advantages and disadvantages that it entails.
2025-01-01remove `allow_two_phase_borrow`Rémy Rakic-2/+1
it's been simplified over the years, but now it's no longer useful. - document its replacement in `BorrowKind` - use that everywhere instead
2024-12-12Make BorrowSet/BorrowData fields accessible via public gettersWill Crichton-10/+56
2024-12-11Make some types and methods related to Polonius + Miri public.Will Crichton-12/+12
2024-11-04Reduce visibilities.Nicholas Nethercote-13/+13
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-2/+2
2024-08-30Remove `#[macro_use] extern crate tracing` from `rustc_borrowck`.Nicholas Nethercote-0/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-7/+8
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-05Remove confusing `use_polonius` flag and do less cloningAmanda Stjerna-1/+1
The `use_polonius` flag is both redundant and confusing since every function it's propagated to also checks if `all_facts` is `Some`, the true test of whether to generate Polonius facts for Polonius or for external consumers. This PR makes that path clearer by simply doing away with the argument and handling the logic in precisely two places: where facts are populated (check for `Some`), and where `all_facts` are initialised. It also delays some statements until after that check to avoid the miniscule performance penalty of executing them when Polonius is disabled. This also addresses @lqd's concern in #125652 by reducing the size of what is cloned out of Polonius facts to just the facts being added, as opposed to the entire vector of potential inputs, and added descriptive comments. *Reviewer note*: the comments in [add_extra_drop_facts](https://github.com/rust-lang/rust/blob/85f90a461262f7ca37a6e629933d455fa9c3ee48/compiler/rustc_borrowck/src/type_check/liveness/trace.rs#L219) should be inspected by a reviewer, in particular the one on L#259 in this PR, which should be trivial for someone with the right background knowledge. I also included some minor lints I found on the way there that I couldn't help myself from addressing.
2024-04-30Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-deadMatthias Krüger-0/+1
Remove many `#[macro_use] extern crate foo` items This requires the addition of more `use` items, which often make the code more verbose. But they also make the code easier to read, because `#[macro_use]` obscures where macros are defined. r? `@fee1-dead`
2024-04-29Rollup merge of #124185 - beepster4096:move_data_base_local_infallible, ↵Matthias Krüger-3/+1
r=pnkfelix Remove optionality from MoveData::base_local This is an artifact from when Places could be based on statics and not just locals. Now, all move paths either are locals or have parents, so this doesn't need to return Option anymore.
2024-04-29Remove `extern crate rustc_middle` from numerous crates.Nicholas Nethercote-0/+1
2024-04-20Add a non-shallow fake borrowNadrieril-1/+2
2024-04-19remove optionality from MoveData::base_localbeepster4096-3/+1
2024-04-03rustc_index: Add a `ZERO` constant to index typesVadim Petrochenkov-1/+1
It is commonly used.
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+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-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-3/+3
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-08rename `BorrowKind::Shallow` to `Fake`lcnr-1/+1
also adds some comments
2023-06-20address most easy commentsZiru Niu-1/+4
2023-06-20merge `BorrowKind::Unique` into `BorrowKind::Mut`Ziru Niu-1/+1
2023-05-23Allow consumers to retrieve borrowck outputJonáš Fiala-2/+2
2023-04-13Remove `ToRegionVid`.Nicholas Nethercote-3/+2
It is only implemented for `Region`, where it is equivalent to the inherent `as_var` method.
2023-03-05Remove `allow(potential_query_instability)` from `borrowck`clubby789-6/+6
2022-12-06`rustc_borrowck`: remove `ref` patternsMaybe Waffle-4/+4
2022-11-09lint auto passAndyJado-0/+2
Revert "lint auto pass" This reverts commit e58e4466384924c491a932d3f18ef50ffa5a5065.
2022-07-01cleanup mir visitor for `rustc::pass_by_value`lcnr-4/+4
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-6/+6
2022-04-20Remove mutable_borrow_reservation_conflict lintJack Huey-4/+0
2021-12-15Remove in_band_lifetimes from borrowckDániel Buga-1/+1
2021-10-25Add BorrowSet to public apiXavier Denis-13/+13
2021-10-16Adopt let_else across the compilerest31-3/+1
This performs a substitution of code following the pattern: let <id> = if let <pat> = ... { identity } else { ... : ! }; To simplify it to: let <pat> = ... { identity } else { ... : ! }; By adopting the let_else feature.
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-1/+1
2021-09-07Move rustc_mir::borrow_check to new crate rustc_borrowck.Camille GILLOT-0/+351