diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-01 07:42:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-01 07:42:56 -0700 |
| commit | f213957c2e01067ab20ba74f71371093ed0b43bb (patch) | |
| tree | 9e2b13066ae0bbf661fd1beb7eecd2a30183e472 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 178b0c2e9954ede56d552f8a625ef59524ab3f60 (diff) | |
| parent | 517d361a1f78cf13d589d0f6b94f5ca005bef540 (diff) | |
| download | rust-f213957c2e01067ab20ba74f71371093ed0b43bb.tar.gz rust-f213957c2e01067ab20ba74f71371093ed0b43bb.zip | |
Rollup merge of #73806 - Aaron1011:feature/approx-universal-upper, r=estebank
Use an 'approximate' universal upper bound when reporting region errors
Fixes #67765
When reporting errors during MIR region inference, we sometimes use
`universal_upper_bound` to obtain a named universal region that we
can display to the user. However, this is not always possible - in a
case like `fn foo<'a, 'b>() { .. }`, the only upper bound for a region
containing `'a` and `'b` is `'static`. When displaying diagnostics, it's
usually better to display *some* named region (even if there are
multiple involved) rather than fall back to a generic error involving
`'static`.
This commit adds a new `approx_universal_upper_bound` method, which
uses the lowest-numbered universal region if the only alternative is to
return `'static`.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
