about summary refs log tree commit diff
path: root/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-42/+0
2021-09-16Add `ConstraintCategory::Usage` for handling aggregate constructionAaron Hill-3/+3
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)
2019-05-12Remove feature(nll) when compare mode is sufficientMatthew Jasper-3/+3
2019-03-11Update testsVadim Petrochenkov-3/+3
2018-12-25Remove licensesMark Rousskov-3/+3
2018-10-21Use new region infer errors for explaining borrowsMatthew Jasper-17/+18
This gives at least some explanation for why a borrow is expected to last for a certain free region. Also: * Reports E0373: "closure may outlive the current function" with NLL. * Special cases the case of returning a reference to (or value referencing) a local variable or temporary (E0515). * Special case assigning a reference to a local variable in a closure to a captured variable.
2018-08-24support user-given types in adtsNiko Matsakis-0/+41