rust/compiler
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
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat Backport another LLVM commit to rustc_apfloat 2020-10-04 02:02:25 +02:00
rustc_arena Use specialization to avoid copying 2020-11-20 21:02:09 +01:00
rustc_ast Accept arbitrary expressions in key-value attributes at parse time 2020-12-09 21:37:32 +03:00
rustc_ast_lowering Rollup merge of #79051 - LeSeulArtichaut:if-let-guard, r=matthewjasper 2020-12-17 11:43:55 +09:00
rustc_ast_passes Rollup merge of #79851 - camelid:better-error-for-default-fn, r=davidtwco 2020-12-10 21:33:10 -08:00
rustc_ast_pretty Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
rustc_attr Get rid of clean::Deprecation 2020-12-14 22:00:46 -05:00
rustc_builtin_macros fix clippy::unnecessary_filter_map 2020-12-11 23:02:19 +01:00
rustc_codegen_cranelift Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis 2020-12-17 18:21:20 +00:00
rustc_codegen_llvm cg_llvm: split dwarf filename and comp dir 2020-12-16 10:33:52 +00:00
rustc_codegen_ssa Rollup merge of #80040 - tmiasko:always-lower-intrinsics, r=Dylan-DPC 2020-12-17 11:36:52 +01:00
rustc_data_structures Rename optin_builtin_traits to auto_traits 2020-11-23 14:14:06 -08:00
rustc_driver Fix unknown-crate when using self-profile with rustdoc 2020-12-01 12:54:03 -05:00
rustc_error_codes Rollup merge of #79639 - sasurau4:feature/add-long-explanation-E0212, r=GuillaumeGomez 2020-12-10 21:33:04 -08:00
rustc_errors Rollup merge of #74293 - GuillaumeGomez:rustdoc-test-compiler-output-color, r=jyn514 2020-11-17 16:13:46 +01:00
rustc_expand Remove docs for non-existent parameters in rustc_expand 2020-12-16 17:34:47 -08:00
rustc_feature tidy: Re-enable check for inline unit tests 2020-12-12 19:18:44 +03:00
rustc_fs_util Remove unused code from remaining compiler crates 2020-10-14 04:14:32 +02:00
rustc_graphviz Rust coverage before splitting instrument_coverage.rs 2020-11-05 18:24:12 -08:00
rustc_hir Rollup merge of #79051 - LeSeulArtichaut:if-let-guard, r=matthewjasper 2020-12-17 11:43:55 +09:00
rustc_hir_pretty Rollup merge of #79051 - LeSeulArtichaut:if-let-guard, r=matthewjasper 2020-12-17 11:43:55 +09:00
rustc_incremental Auto merge of #74967 - Aaron1011:feature/incr-def-path-table, r=pnkfelix 2020-12-01 14:30:02 +00:00
rustc_index Stabilise then 2020-11-22 13:45:14 +00:00
rustc_infer Move binder for dyn to each list item 2020-12-11 15:02:46 -05:00
rustc_interface Convenience funcs for some_option.unwrap_or(...) 2020-12-14 17:27:27 -08:00
rustc_lexer Fix some clippy lints 2020-12-03 17:08:19 -05:00
rustc_lint Move binder for dyn to each list item 2020-12-11 15:02:46 -05:00
rustc_lint_defs Validate naked functions definitions 2020-12-07 00:00:00 +00:00
rustc_llvm llvm: update ffi bindings for split dwarf 2020-12-16 10:31:42 +00:00
rustc_macros ./x.py fmt 2020-12-13 13:36:01 -08:00
rustc_metadata Rollup merge of #80039 - LeSeulArtichaut:rm-tyencoder-tcx, r=matthewjasper 2020-12-17 11:44:03 +09:00
rustc_middle Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis 2020-12-17 18:21:20 +00:00
rustc_mir Rollup merge of #78164 - Aaron1011:fix/async-region-name, r=tmandry 2020-12-18 00:30:09 +01:00
rustc_mir_build Rollup merge of #79051 - LeSeulArtichaut:if-let-guard, r=matthewjasper 2020-12-17 11:43:55 +09:00
rustc_parse Auto merge of #79978 - Aaron1011:fix/capture-broken-token, r=petrochenkov 2020-12-13 19:31:06 +00:00
rustc_parse_format /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_passes Rollup merge of #79877 - bstrie:depinfut, r=oli-obk 2020-12-17 11:43:57 +09:00
rustc_plugin_impl Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
rustc_privacy Move binder for dyn to each list item 2020-12-11 15:02:46 -05:00
rustc_query_system Use def_path_hash_to_def_id when re-using a RawDefId 2020-12-10 16:04:19 -05:00
rustc_resolve Resolve enum field visibility correctly 2020-12-12 14:04:59 -08:00
rustc_save_analysis Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_serialize Fix some clippy lints 2020-12-03 17:08:19 -05:00
rustc_session Rollup merge of #80073 - kulikjak:add-target-alias-support, r=varkor 2020-12-17 11:44:08 +09:00
rustc_span Switch to Symbol for item.name 2020-12-14 22:19:15 -05:00
rustc_symbol_mangling Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis 2020-12-17 18:21:20 +00:00
rustc_target Add support for target aliases 2020-12-16 10:41:07 +01:00
rustc_trait_selection Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis 2020-12-17 18:21:20 +00:00
rustc_traits Move binder for dyn to each list item 2020-12-11 15:02:46 -05:00
rustc_ty_utils Be cautious of calling upvar_tys before mir 2020-11-29 19:20:28 -05:00
rustc_type_ir Fix typo in DebruijnIndex documentation 2020-12-12 16:13:06 +01:00
rustc_typeck Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis 2020-12-17 18:21:20 +00:00