diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-03-15 10:49:05 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-03-21 05:40:59 -0400 |
| commit | f71de45b230954c25f2337272852be1146d26136 (patch) | |
| tree | 08496dc03f97244429d695a74197dbe5084cefa9 /src/rustllvm/RustWrapper.cpp | |
| parent | fc3c90cf8af1a2c0e9e6167daed956905b5951a2 (diff) | |
| download | rust-f71de45b230954c25f2337272852be1146d26136.tar.gz rust-f71de45b230954c25f2337272852be1146d26136.zip | |
use subtyping when we create a closure instead of for upvar types
We used to make the upvar types in the closure `==` but that was stronger than we needed. Subtyping suffices, since we are copying the upvar value into the closure field. This in turn allows us to infer smaller lifetimes in captured values in some cases (like the example here), avoiding errors.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
