rust/src/test
Aaron Hill 517d361a1f
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`.
2020-06-27 14:01:59 -04:00
..
assembly Add initial asm!() support for hexagon 2020-06-16 08:58:13 -05:00
auxiliary
codegen Rollup merge of #72620 - tmiasko:linkage-name, r=eddyb 2020-06-26 00:38:56 -07:00
codegen-units Change how compiler-builtins gets many CGUs 2020-06-15 07:38:00 -07:00
compile-fail Rollup merge of #72934 - christianpoveda:mut-borrows-in-consts, r=oli-obk 2020-06-19 19:42:51 -07:00
debuginfo Implement new gdb/lldb pretty-printers 2020-06-09 16:13:11 +03:00
incremental Auto merge of #72520 - jonas-schievink:cleanup-userty, r=matthewjasper 2020-05-25 06:17:15 +00:00
mir-opt Show the values and computation that would overflow a const evaluation or propagation 2020-06-26 10:08:52 +02:00
pretty asm: Allow multiple template strings; interpret them as newline-separated 2020-06-15 12:35:27 -07:00
run-make Auto merge of #71858 - petrochenkov:env, r=Mark-Simulacrum 2020-06-25 22:52:59 +00:00
run-make-fulldeps compiletest: Add directives to detect sanitizer support 2020-06-13 14:24:30 +02:00
run-pass-valgrind
rustdoc Show the values and computation that would overflow a const evaluation or propagation 2020-06-26 10:08:52 +02:00
rustdoc-js rustdoc: Fix doc aliases with crate filtering 2020-06-23 09:27:37 +01:00
rustdoc-js-std Make current crate aliases go first 2020-05-14 11:36:02 +02:00
rustdoc-ui Generate docs for links to private items when passed --document-private 2020-06-26 07:23:39 -04:00
rustfix
ui Use an 'approximate' universal upper bound when reporting region errors 2020-06-27 14:01:59 -04:00
ui-fulldeps make all uses of ty::Error or ConstKind::Error delay a span bug 2020-06-15 18:25:58 -05:00
COMPILER_TESTS.md