summary refs log tree commit diff
path: root/src/test/ui/union
AgeCommit message (Collapse)AuthorLines
2020-04-08Use `PredicateObligation`s instead of `Predicate`sEsteban Küber-2/+10
Keep more information about trait binding failures.
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-7/+2
2020-03-24Rollup merge of #70077 - Aaron1011:feature/new-def-path-ident, r=petrochenkovMazdak Farrokhzad-2/+15
Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-23Ignore tests on some platforms due to #53081Aaron Hill-2/+7
2020-03-22Store idents for `DefPathData` into crate metadataAaron Hill-0/+8
Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-22Add span label to primary error spanEsteban Küber-1/+1
2020-03-22Increase verbosity when suggesting subtle code changesEsteban Küber-2/+7
2020-02-28Do not suggest implementing traits if present in predicatesEsteban Küber-3/+0
2020-02-28Review comments: split requirement text to multiple lines for readabilityEsteban Küber-1/+2
2020-02-28Show information of chain of bound obligationsEsteban Küber-2/+5
When the obligation that couldn't be fulfilled is specific to a nested obligation, maintain both the nested and parent obligations around for more accurate and detailed error reporting.
2020-02-28Track all predicates in errors, not just trait obligationsEsteban Küber-1/+3
Surface associated type projection bounds that could not be fulfilled in E0599 errors. Always present the list of unfulfilled trait bounds, regardless of whether we're pointing at the ADT or trait that didn't satisfy it.
2020-02-28Deduplicate information in E0599Esteban Küber-3/+1
2020-02-28Reduce vebosity of E0599Esteban Küber-5/+1
2020-02-28Add more context to E0599 errorsEsteban Küber-2/+9
Point at the intermediary unfullfilled trait bounds.
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+2
2020-02-02Account for `?Sized` type parameter boundsEsteban Küber-3/+3
2020-01-24Normalise notes with the/isvarkor-4/+4
2020-01-11Rollup merge of #68014 - estebank:unify-e0599, r=cramertjYuki Okushi-2/+2
Unify output of "variant not found" errors Fix #49566.
2020-01-09Update testsVadim Petrochenkov-1/+8
2020-01-08Unify output of "variant not found" errorsEsteban Küber-2/+2
2019-11-16Use "field is never read" instead of "field is never used"cosine-10/+10
2019-10-21Rollup merge of #62330 - SimonSapin:no-drop-in-union-fields, r=RalfJungMazdak Farrokhzad-167/+346
Change untagged_unions to not allow union fields with drop This is a rebase of #56440, massaged to solve merge conflicts and make the test suite pass. Change untagged_unions to not allow union fields with drop Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in `ManuallyDrop` (or similar). The stable rule remains, that union fields must be `Copy`. We use the new rule for the `untagged_union` feature. Tracking issue: https://github.com/rust-lang/rust/issues/55149
2019-10-15Handle more casesEsteban Küber-3/+6
2019-10-11Update ui stderrOliver Scherer-15/+2
2019-10-11Ensure we do not treat all unions as not having any drop glue.Oliver Scherer-0/+47
2019-10-11Preserve originally intended test semanticsOliver Scherer-4/+6
2019-10-11rpass tests are now part of `ui` testsOliver Scherer-1/+43
2019-10-11Extend union-nodrop.rs testSimon Sapin-1/+5
2019-10-11Update src/test/run-pass/union/union-nodrop.rsSimon Sapin-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-10-11Fixes #41073, it is no longer an ICESimon Sapin-0/+39
2019-10-11Change untagged_unions to not allow union fields with dropUlrik Sverdrup-68/+137
Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in ManuallyDrop. The stable rule remains, that union fields must be Copy. We use the new rule for the `untagged_union` feature. See RFC 2514. Note for ui tests: We can't test move out through Box's deref-move since we can't have a Box in a union anymore.
2019-10-11Remove most uses of `allow(unions_with_drop_fields)` in testsSimon Sapin-101/+90
2019-09-12Auto merge of #64359 - varkor:opaque-ty-in-extern, r=estebankbors-3/+4
Forbid opaque types in `extern "C"` blocks Fixes #64338.
2019-09-10Refactor "not FFI-safe" diagnosticvarkor-3/+4
2019-09-08Give method not found a primary span labelEsteban Küber-1/+1
2019-08-31Use span label instead of note for cause in E0631Esteban Küber-12/+6
2019-08-15Group all ui tests and move to abi #62593Kevin Per-37/+0
2019-07-27tests: Move run-pass tests with naming conflicts to uiVadim Petrochenkov-0/+111
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+839
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-1/+1
2019-06-10Implement RFC 2645 (transparent enums and unions)Michael Bradshaw-1/+1
Tracking issue: #60405
2019-04-22update tests for migrate mode by defaultMatthew Jasper-111/+44
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-5/+5
2019-03-11Update NLL testsVadim Petrochenkov-6/+6
2019-03-11Update testsVadim Petrochenkov-49/+49
2019-01-24Fix --compare-mode=nll testsEsteban Küber-6/+6
2019-01-13Rollup merge of #57102 - davidtwco:issue-57100, r=nikomatsakisMazdak Farrokhzad-10/+16
NLL: Add union justifications to conflicting borrows. Fixes #57100. This PR adds justifications to error messages for conflicting borrows of union fields. Where previously an error message would say ``cannot borrow `u.b` as mutable..``, it now says ``cannot borrow `u` (via `u.b`) as mutable..``. r? @pnkfelix
2019-01-06Auto merge of #57291 - euclio:method-call-suggestion, r=estebankbors-4/+3
use structured suggestion for method calls Furthermore, don't suggest calling the method if it is part of a place expression, as this is invalid syntax. I'm thinking it might be worth putting a label on the method assignment span like "this is a method" and removing the span from the "methods are immutable" text so it isn't reported twice. The suggestions in `src/test/ui/did_you_mean/issue-40396.stderr` are suboptimal. I could check if the containing expression is `BinOp`, but I'm not sure if that's general enough. Any ideas? r? @estebank
2019-01-04Improve diagnostic labels and add note.David Wood-4/+10
This commit improves diagnostic labels to mention which field a borrow overlaps with and adds a note explaining that the fields overlap.
2019-01-03use structured suggestion for method callsAndy Russell-4/+3
Furthermore, don't suggest calling the method if it is part of a place expression, as this is invalid syntax.