rust/src/test
bors 0c0826c3e2 Auto merge of #88708 - Aaron1011:aggregate-usage, r=oli-obk
Add `ConstraintCategory::Usage` for handling aggregate construction

In some cases, we emit borrowcheck diagnostics pointing
at a particular field expression in a struct expression
(e.g. `MyStruct { field: my_expr }`). However, this
behavior currently relies on us choosing the
`ConstraintCategory::Boring` with the 'correct' span.
When adding additional variants to `ConstraintCategory`,
(or changing existing usages away from `ConstraintCategory::Boring`),
the current behavior can easily get broken, since a non-boring
constraint will get chosen over a boring one.

To make the diagnostic output less fragile, this commit
adds a `ConstraintCategory::Usage` variant. We use this variant
for the temporary assignments created for each field of
an aggregate we are constructing.

Using this new variant, we can emit a message mentioning
"this usage", emphasizing the fact that the error message
is related to the specific use site (in the struct expression).

This is preparation for additional work on improving NLL error messages
(see #57374)
2021-09-20 00:53:13 +00:00
..
assembly enum niche allocation grows toward zero if possible 2021-09-13 21:55:14 +02:00
auxiliary
codegen Add test for -Z panic-in-drop=abort 2021-09-11 16:13:30 +01:00
codegen-units
debuginfo Disable debuginfo test on Windows that fails in new cdb version. 2021-09-15 15:59:48 -07:00
incremental Rebase fallout. 2021-09-11 17:52:39 +02:00
mir-opt ./x.py test --bless 2021-09-18 00:00:00 +00:00
pretty Revert "Add test for pretty printing anonymous types" 2021-09-09 09:14:16 -04:00
run-make Auto merge of #88161 - michaelwoerister:fix-whole-archive-no-bundle, r=petrochenkov 2021-09-07 12:31:11 +00:00
run-make-fulldeps Set the library path in sysroot-crates-are-unstable 2021-09-16 17:30:36 -07:00
run-pass-valgrind
rustdoc Add test for primitive in "jump to definition" feature 2021-09-13 17:44:39 +02:00
rustdoc-gui Rollup merge of #88896 - GuillaumeGomez:flakyness, r=camelid 2021-09-13 21:20:43 +02:00
rustdoc-js fix(rustdoc): generics search 2021-07-01 06:40:27 -07:00
rustdoc-js-std Fix linkcheck issues 2021-09-12 02:30:24 +00:00
rustdoc-json rustdoc: Clean up handling of lifetime bounds 2021-09-02 14:27:59 -07:00
rustdoc-ui Don't lint about missing code examples in derived traits 2021-09-17 00:39:15 +02:00
ui Auto merge of #88708 - Aaron1011:aggregate-usage, r=oli-obk 2021-09-20 00:53:13 +00:00
ui-fulldeps Detect bare blocks with type ascription that were meant to be a struct literal 2021-09-03 14:43:04 +00:00
COMPILER_TESTS.md