rust/compiler/rustc_mir/src
Dylan DPC 720b6941df
Rollup merge of #78164 - Aaron1011:fix/async-region-name, r=tmandry
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.
2020-12-18 00:30:09 +01:00
..
borrow_check Prefer regions with an external_name in approx_universal_upper_bound 2020-12-17 13:24:40 -05:00
const_eval Auto merge of #79840 - dvtkrlbs:issue-79667, r=oli-obk 2020-12-17 09:11:28 +00:00
dataflow compiler: fold by value 2020-11-16 22:34:57 +01:00
interpret Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis 2020-12-17 18:21:20 +00:00
monomorphize Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
transform Rollup merge of #80040 - tmiasko:always-lower-intrinsics, r=Dylan-DPC 2020-12-17 11:36:52 +01:00
util Auto merge of #78399 - vn-ki:gsgdt-graphviz, r=oli-obk 2020-12-15 22:00:02 +00:00
lib.rs Dogfood 'str_split_once() with compiler/ 2020-12-07 12:48:44 -07:00
shim.rs Support building clone shims for arrays with generic size 2020-11-21 00:00:00 +00:00