diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-10-20 16:31:54 -0400 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-12-17 13:24:40 -0500 |
| commit | 419d3ae02849d47899f8fc221d37b05ac24f4efd (patch) | |
| tree | 74e550e80e64fc42f648ff447086a03c0b870b8d /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | d23e08448332425a84ae23124bea4dbd685536ce (diff) | |
| download | rust-419d3ae02849d47899f8fc221d37b05ac24f4efd.tar.gz rust-419d3ae02849d47899f8fc221d37b05ac24f4efd.zip | |
Prefer regions with an `external_name` in `approx_universal_upper_bound`
Fixes #75785 When displaying a MIR borrowcheck error, we may need to find an upper bound for a region, which gives us a region to point to in the error message. However, a region might outlive multiple distinct universal regions, in which case the only upper bound is 'static To try to display a meaningful error message, we compute an 'approximate' upper bound by picking one of the universal regions. Currently, we pick the region with the lowest index - however, this caused us to produce a suboptimal error message in issue #75785 This PR `approx_universal_upper_bound` to prefer regions with an `external_name`. This causes us to prefer regions from function arguments/upvars, which seems to lead to a nicer error message in some cases.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
