summary refs log tree commit diff
path: root/src/test/ui/moves
AgeCommit message (Collapse)AuthorLines
2020-06-26Explain move errors that occur due to method calls involving `self`Aaron Hill-3/+253
This is a re-attempt of #72389 (which was reverted in #73594) Instead of using `ExpnKind::Desugaring` to represent operators, this PR checks the lang item directly.
2020-06-24Provide suggestions for some moved value errorsEsteban Küber-0/+4
When encountering an used moved value where the previous move happened in a `match` or `if let` pattern, suggest using `ref`. Fix #63988. When encountering a `&mut` value that is used in multiple iterations of a loop, suggest reborrowing it with `&mut *`. Fix #62112.
2020-06-23Rollup merge of #73600 - Aaron1011:fix/move-in-macro, r=ecstatic-morseDylan DPC-1/+33
Fix spurious 'value moved here in previous iteration of loop' messages Fixes #46099 Previously, we would check the 'move' and 'use' spans to see if we should emit this message. However, this can give false positives when macros are involved, since two distinct expressions may end up with the same span. Instead, we check the actual MIR `Location`, which eliminates false positives.
2020-06-22Revert "Rollup merge of #72389 - Aaron1011:feature/move-fn-self-msg, ↵Aaron Hill-253/+3
r=nikomatsakis" This reverts commit 372cb9b69c76a042d0b9d4b48ff6084f64c84a2c, reversing changes made to 5c61a8dc34c3e2fc6d7f02cb288c350f0233f944.
2020-06-21Fix spurious 'value moved here in previous iteration of loop' messagesAaron Hill-1/+33
Fixes #46099 Previously, we would check the 'move' and 'use' spans to see if we should emit this message. However, this can give false positives when macros are involved, since two distinct expressions may end up with the same span. Instead, we check the actual MIR `Location`, which eliminates false positives.
2020-06-11Use `fn_span` to point to the actual method callAaron Hill-11/+11
2020-06-11Explain move errors that occur due to method calls involving `self`Aaron Hill-3/+253
2020-03-29Tweak `suggest_constraining_type_param`Esteban Küber-4/+3
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
2020-02-09Improve reporting errors and suggestions for trait boundsPatryk Wychowaniec-3/+7
2020-02-02move_ref_patterns: introduce testsMazdak Farrokhzad-1/+1
bindings_after_at: harden tests
2020-01-18slice_patterns: remove gates in testsMazdak Farrokhzad-6/+4
2019-12-21Add more tests for slice patternsMatthew Jasper-0/+168
2019-11-28Use structured suggestion when requiring `Copy` constraint in type paramEsteban Küber-3/+3
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-3/+3
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+199
2019-06-03Update tests for changes to cannot move errorsMatthew Jasper-24/+17
2019-05-29Update ui test suite to use dynmemoryruins-1/+1
2019-05-03Update testsChristopher Vittal-17/+4
2019-04-23Update ui testsvarkor-2/+2
2019-04-23Remove unnecessary ignore-tidy-linelengthvarkor-2/+0
2019-04-22update tests for migrate mode by defaultMatthew Jasper-519/+170
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-2/+2
2019-03-11Update NLL testsVadim Petrochenkov-32/+32
2019-03-11Update testsVadim Petrochenkov-32/+32
2019-02-20./x.py test src/test/ui --stage 1 --bless -i --compare-mode=nllClint Frederickson-2/+2
2019-02-18re-blessing error output: ./x.py test src/test/ui --stage 1 --blessClint Frederickson-1/+1
2019-02-06error output updated by ./x.py test --stage 1 src/test/ui --incremental --blessClint Frederickson-1/+1
2019-01-24Fix --compare-mode=nll testsEsteban Küber-36/+72
2019-01-24When using value after move, point at span of localEsteban Küber-2/+2
When trying to use a value after move, instead of using a note, point at the local declaration that has a type that doesn't implement `Copy` trait.
2018-12-25Remove licensesMark Rousskov-253/+63
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-1/+1
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-10-29Don't emit cannot move errors twice in migrate modeMatthew Jasper-29/+2
2018-10-17Update output for borrowck=migrate compare mode.David Wood-2/+29
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
2018-10-03Clearer later use messages for callsMatthew Jasper-4/+3
Give a special message when the later use is from a call. Use the span of the callee instead of the whole expression. For conflicting borrow messages say that the later use is of the first borrow.
2018-09-28test fix for #54015Rusty Blitzerr-0/+11
2018-08-15Bless testsashtneoi-4/+7
2018-08-15Bless UI testsashtneoi-2/+8
2018-08-14Improved how upvars are detected when presenting errors using prefixes.David Wood-0/+2
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+1341