about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-20 21:12:18 +0000
committerbors <bors@rust-lang.org>2019-02-20 21:12:18 +0000
commit1349c84a4fa0fca9b866b2e859d28ee185ca0c1b (patch)
tree8276b142700103e31a1fc7e74bb1a71a71df4a73 /src/liballoc
parentf66e4697ae286985ddefc53c3a047614568458bb (diff)
parent9661ee6af47b39bc4c355b6aea2d0ebb14d203b8 (diff)
downloadrust-1349c84a4fa0fca9b866b2e859d28ee185ca0c1b.tar.gz
rust-1349c84a4fa0fca9b866b2e859d28ee185ca0c1b.zip
Auto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelix
make generalization code create new variables in correct universe

In our type inference system, when we "generalize" a type T to become
a suitable value for a type variable V, we sometimes wind up creating
new inference variables. So, for example, if we are making V be some
subtype of `&'X u32`, then we might instantiate V with `&'Y u32`.
This generalized type is then related `&'Y u32 <: &'X u32`, resulting
in a region constriant `'Y: 'X`. Previously, however, we were making
these fresh variables like `'Y` in the "current universe", but they
should be created in the universe of V. Moreover, we sometimes cheat
in an invariant context and avoid creating fresh variables if we know
the result must be equal -- we can only do that when the universes
work out.

Fixes #57843

r? @pnkfelix
Diffstat (limited to 'src/liballoc')
0 files changed, 0 insertions, 0 deletions