Skip to content

Commit 8770d0f

Browse files
committed
remove VerifyRegSubReg and cleanup region infer
We used to make region->region edges part of the verify set, but this change stores them like other edges, as a full-fledged constraint. Besides making the code somewhat cleaner, this allows them to be more easily dropped as part of `pop_skolemized`. This change also refactors the code a bit to remove some intermediate data structures that are no longer particular useful (e.g., VarValue).
1 parent cacbb21 commit 8770d0f

File tree

2 files changed

+132
-143
lines changed

2 files changed

+132
-143
lines changed

src/librustc/infer/region_inference/graphviz.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ fn constraint_to_nodes(c: &Constraint) -> (Node, Node) {
213213
match *c {
214214
Constraint::ConstrainVarSubVar(rv_1, rv_2) =>
215215
(Node::RegionVid(rv_1), Node::RegionVid(rv_2)),
216-
Constraint::ConstrainRegSubVar(r_1, rv_2) => (Node::Region(r_1), Node::RegionVid(rv_2)),
217-
Constraint::ConstrainVarSubReg(rv_1, r_2) => (Node::RegionVid(rv_1), Node::Region(r_2)),
216+
Constraint::ConstrainRegSubVar(r_1, rv_2) =>
217+
(Node::Region(r_1), Node::RegionVid(rv_2)),
218+
Constraint::ConstrainVarSubReg(rv_1, r_2) =>
219+
(Node::RegionVid(rv_1), Node::Region(r_2)),
220+
Constraint::ConstrainRegSubReg(r_1, r_2) =>
221+
(Node::Region(r_1), Node::Region(r_2)),
218222
}
219223
}
220224

0 commit comments

Comments
 (0)