about summary refs log tree commit diff
path: root/src/test/ui/nll/move-errors.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-210/+0
2022-12-13Account for dereference expressionsEsteban Küber-15/+20
2022-12-13Suggest `ref` for some patterns as a fallbackEsteban Küber-0/+28
2022-12-13Change pattern borrowing suggestions to be verboseEsteban Küber-20/+45
Synthesize a more accurate span and use verbose suggestion output to make the message clearer.
2022-07-31Improve `cannot move out of` error messageObei Sideg-2/+2
2020-09-02pretty: trim paths of unique symbolsDan Aloni-6/+6
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.
2019-11-25Tweak move error due to non-CopyEsteban Küber-12/+2
2019-06-04Remove asterisk suggestion for move errors in borrowckKenny Goodin-5/+5
As per issue #54985 removes the not useful suggestion to remove asterisk in move errors. Includes minor changes to tests in the `ui` suite to account for the removed suggestion.
2019-06-03Update tests for changes to cannot move errorsMatthew Jasper-59/+34
2019-05-12Remove feature(nll) when compare mode is sufficientMatthew Jasper-22/+22
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+1
2019-03-11Update testsVadim Petrochenkov-3/+3
2018-12-25Remove licensesMark Rousskov-22/+22
2018-10-01Add special cases for move from `Rc`/`Arc` errors.David Wood-2/+2
This commit special cases the move out of borrowed content error, previously: ``` error[E0507]: cannot move out of borrowed content --> src/main.rs:7:10 | 7 | drop(x.field); | ^ cannot move out of borrowed content ``` to instead mention that it is a move out of a `Rc`/`Arc` which is more helpful: ``` error[E0507]: cannot move out of an `Rc` --> src/main.rs:7:10 | 7 | drop(x.field); | ^ cannot move out of an `Rc` ```
2018-08-15Bless UI testsashtneoi-29/+65
2018-07-31NLL: On "cannot move out of type" error, print original source before rewrite.Felix S. Klock II-9/+20
* Arguably this change is sometimes injecting noise into the output (namely in the cases where the suggested rewrite is inline with the suggestion and we end up highlighting the original source code). I would not be opposed to something more aggressive/dynamic, like revising the suggestion code to automatically print the original source when necessary (e.g. when the error does not have a span that includes the span of the suggestion). * Also, as another note on this change: The doc comment for `Diagnostic::span_suggestion` says: /// The message /// /// * should not end in any punctuation (a `:` is added automatically) /// * should not be a question /// * should not contain any parts like "the following", "as shown" but the `:` is *not* added when the emitted line appears out-of-line relative to the suggestion. I find that to be an unfortunate UI experience. ---- As a drive-by fix, also changed code to combine multiple suggestions for a pattern into a single multipart suggestion (which vastly improves user experience IMO). ---- Includes the updates to expected NLL diagnostics.
2018-06-27Update tests for grouped nll move errorsMatthew Jasper-0/+140