summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/constraints
AgeCommit message (Collapse)AuthorLines
2022-12-20Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obkbors-6/+4
Improve syntax of `newtype_index` This makes it more like proper Rust and also makes the implementation a lot simpler. Mostly just turns weird flags in the body into proper attributes. It should probably also be converted to an attribute macro instead of function-like, but that can be done in a future PR.
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-4/+2
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18Make `#[debug_format]` an attribute in `newtype_index`Nilstrieb-2/+2
This removes the `custom` format functionality as its only user was trivially migrated to using a normal format. If a new use case for a custom formatting impl pops up, you can add it back.
2022-12-18don't clone Copy typesMatthias Krüger-1/+1
2022-11-09lint auto passAndyJado-0/+3
Revert "lint auto pass" This reverts commit e58e4466384924c491a932d3f18ef50ffa5a5065.
2022-11-05simplify applying closure requirementsAli MJ Al-Nasrawy-0/+4
Don't use `ConstraintCategory::ClosureBounds`! Set the category and the span for the promoted constraints to that of the original constraint earlier than before. This eliminates the need for `closure_bounds_mapping`.
2022-10-27Revert "Make ClosureOutlivesRequirement not rely on an unresolved type"Michael Goulet-1/+1
This reverts commit a6b5f95fb028f9feb4a2957c06b35035be2c6155.
2022-10-19Make ClosureOutlivesRequirement not rely on an unresolved typeMichael Goulet-1/+1
2022-09-17Use Predicate ConstraintCategory when normalizingJack Huey-4/+1
2022-09-16Revert "Use Predicate ConstraintCategory when normalizing"Jack Huey-1/+4
This reverts commit aae37f87632dd74856d55c0cd45d2c192379c990.
2022-09-13Use Predicate ConstraintCategory when normalizingJack Huey-4/+1
2022-09-13Cleanup retrieve_closure_constraint_infoJack Huey-1/+1
2022-08-29Various changes to logging of borrowck-related codeJack Huey-2/+2
2022-05-25add def_id and substs to ConstraintCategory::CallArgumentb-naber-1/+1
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-21/+25
2022-04-22Make the lifetime accurate which is used in the region constraints partSparrowLii-6/+3
2022-04-19Add an explicit `Span` field to `OutlivesConstraint`Aaron Hill-0/+8
Previously, we would retrieve the span from the `Body` using the `locations` field. However, we may end up changing the `locations` field when moving a constraint from a promoted to a different body. We now store the original `Span` in a dedication field, so that changes to the `locations` do not affect the quality of our diagnostics.
2022-01-19Remove ordering traits from `rustc_borrowck::constraints::OutlivesConstraint`pierwill-1/+1
In two cases where this ordering was used, I've replaced the sorting to use a key that does not include DefId. I'm not sure this is correct in terms of our goals from #90317, or otherwise.
2021-09-07Move rustc_mir::borrow_check to new crate rustc_borrowck.Camille GILLOT-0/+350