about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-01 07:42:56 -0700
committerGitHub <noreply@github.com>2020-07-01 07:42:56 -0700
commitf213957c2e01067ab20ba74f71371093ed0b43bb (patch)
tree9e2b13066ae0bbf661fd1beb7eecd2a30183e472 /src/libstd/sys/unix/stack_overflow.rs
parent178b0c2e9954ede56d552f8a625ef59524ab3f60 (diff)
parent517d361a1f78cf13d589d0f6b94f5ca005bef540 (diff)
downloadrust-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