summary refs log tree commit diff
path: root/src/test/ui/union
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-3/+3
2020-07-14Rollup merge of #74228 - estebank:unsized-param, r=davidtwcoManish Goregaokar-16/+53
Provide structured suggestion on unsized fields and fn params * Suggest borrowing or boxing unsized fields * Suggest borrowing fn parameters * Remove some verbosity of unsized errors * Remove `on_unimplemented` note from `trait Sized` Fix #23286, fix #28653. r? @davidtwco
2020-07-14Reword messageEsteban Küber-5/+5
2020-07-14Remove redundant explanatory `note` for type parametersEsteban Küber-3/+0
2020-07-14Remove `Sized` `on_unimplemented` noteEsteban Küber-5/+0
2020-07-14Suggest boxing or borrowing unsized fieldsEsteban Küber-8/+53
2020-07-12Detect tuple struct incorrectly used as struct patEsteban Küber-6/+6
2020-06-10review comments: only suggest one substitutionEsteban Küber-5/+1
2020-06-10On recursive ADT, provide indirection structured suggestionEsteban Küber-2/+9
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