about summary refs log tree commit diff
path: root/src/test/ui/derives
AgeCommit message (Collapse)AuthorLines
2021-09-06Suggest deriving traits if possiblePaul Trojahn-0/+4
This only applies to builtin derives as I don't think there is a clean way to get the available derives in typeck. Closes #85851
2021-08-16Use note to point at bound introducing requirementEsteban Küber-33/+39
2021-08-10Move some UI tests to more suitable subdirsYuki Okushi-0/+49
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-10/+10
2021-07-19Various diagnostics clean ups/tweaksEsteban Küber-51/+261
* Always point at macros, including derive macros * Point at non-local items that introduce a trait requirement * On private associated item, point at definition
2021-06-22Change Debug unimplemented message per requestAris Merchant-4/+4
2021-06-16Update test stderr filesAris Merchant-12/+4
2021-05-13completion uwuEllen-1/+0
2021-05-12Show macro name in 'this error originates in macro' messageAaron Hill-41/+41
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
2021-04-16builtin derive macros: fix error with const generics defaultSoveu-0/+14
2021-03-29Suggest box/pin/arc ing receiver on method callsEsteban Küber-8/+0
2021-03-27make unaligned_refereces future-incompat lint warn-by-default, and remove ↵Ralf Jung-7/+7
the safe_packed_borrows lint that it replaces
2021-02-09./x.py test --blessTomasz Miąsko-180/+4
2021-02-09Fix derived PartialOrd operatorsTomasz Miąsko-0/+60
The derived implementation of `partial_cmp` compares matching fields one by one, stopping the computation when the result of a comparison is not equal to `Some(Equal)`. On the other hand the derived implementation for `lt`, `le`, `gt` and `ge` continues the computation when the result of a field comparison is `None`, consequently those operators are not transitive and inconsistent with `partial_cmp`. Fix the inconsistency by using the default implementation that fall-backs to the `partial_cmp`. This also avoids creating very deeply nested closures that were quite costly to compile.
2021-02-07Address review commentsVadim Petrochenkov-0/+11
2021-02-07expand/resolve: Turn `#[derive]` into a regular macro attributeVadim Petrochenkov-29/+34
2021-02-01Regression tests for issue 81211.Felix S. Klock II-0/+72
2021-01-26Avoid describing a method as 'not found' when bounds are unsatisfiedAaron Hill-3/+3
Fixes #76267 When there is a single applicable method candidate, but its trait bounds are not satisfied, we avoid saying that the method is "not found". Insted, we update the error message to directly mention which bounds are not satisfied, rather than mentioning them in a note.
2020-12-07Move some tests to subdirectoriesVadim Petrochenkov-0/+21
2020-09-08Update testsGuillaume Gomez-11/+13
2020-09-02pretty: trim paths of unique symbolsDan Aloni-104/+104
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-07-27mv std libs to library/mark-11/+11
2020-04-08Small tweaks to required bound spanEsteban Küber-3/+3
2020-04-08Use `PredicateObligation`s instead of `Predicate`sEsteban Küber-4/+20
Keep more information about trait binding failures.
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-182/+53
2020-03-23Ignore tests on some platforms due to #53081Aaron Hill-1/+6
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-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/+61
2020-01-24Normalise notes with the/isvarkor-2/+2
2020-01-11Auto merge of #65912 - estebank:variants-orig, r=petrochenkovbors-2/+16
Point at the span for the definition of crate foreign ADTs Follow up to #65421. Partially addresses #65386. Blocked on #53081.
2020-01-11Rollup merge of #68014 - estebank:unify-e0599, r=cramertjYuki Okushi-1/+1
Unify output of "variant not found" errors Fix #49566.
2020-01-10Ignore platforms that can't point to stdEsteban Küber-3/+12
2020-01-10Use `def_span` to minimize definition span to first line when possibleEsteban Küber-1/+1
2020-01-10Point at the span for the definition of crate foreign ADTsEsteban Küber-0/+5
2020-01-09Update testsVadim Petrochenkov-13/+213
2020-01-08Unify output of "variant not found" errorsEsteban Küber-1/+1
2019-12-28Ignore i586-unknown-linux-gnu and i586-unknown-musl in testsEsteban Küber-65/+154
2019-11-16Modify primary label message to be inline with error messageEsteban Küber-3/+3
2019-11-16Suggest borrowing when it would satisfy an unmet trait boundEsteban Küber-6/+15
When there are multiple implementors for the same trait that is present in an unmet binding, modify the E0277 error to refer to the parent obligation and verify whether borrowing the argument being passed in would satisfy the unmet bound. If it would, suggest it.
2019-11-02also adjust ignore in generated testsRalf Jung-42/+64
2019-09-22ignore-x86 instead of ignore-muslEsteban Küber-4/+4
2019-09-22ignore musl target in tests to avoid issues with output differencesEsteban Küber-4/+12
2019-09-22On obligation errors point at the unfulfilled binding when possibleEsteban Küber-7/+19
2019-09-19When possible point at argument causing item obligation failureEsteban Küber-6/+6