Rollup merge of #94006 - pierwill:upvar-field, r=nikomatsakis
Use a `Field` in `ConstraintCategory::ClosureUpvar`
As part of #90317, we do not want `HirId` to implement `Ord`, `PartialOrd`. This line of code has made that difficult
1b27144afc/compiler/rustc_borrowck/src/region_infer/mod.rs (L2184)
since it sorts a [`ConstraintCategory::ClosureUpvar(HirId)`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.ConstraintCategory.html#variant.ClosureUpvar).
This PR makes that variant take a [`Field`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Field.html) instead.
r? `@nikomatsakis`
This commit is contained in:
commit
c28940e49d
3 changed files with 19 additions and 11 deletions
|
@ -341,7 +341,7 @@ pub enum ConstraintCategory {
|
|||
/// like `Foo { field: my_val }`)
|
||||
Usage,
|
||||
OpaqueType,
|
||||
ClosureUpvar(hir::HirId),
|
||||
ClosureUpvar(Field),
|
||||
|
||||
/// A constraint from a user-written predicate
|
||||
/// with the provided span, written on the item
|
||||
|
@ -363,7 +363,7 @@ pub enum ConstraintCategory {
|
|||
#[derive(TyEncodable, TyDecodable, HashStable)]
|
||||
pub enum ReturnConstraint {
|
||||
Normal,
|
||||
ClosureUpvar(hir::HirId),
|
||||
ClosureUpvar(Field),
|
||||
}
|
||||
|
||||
/// The subject of a `ClosureOutlivesRequirement` -- that is, the thing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue