rust/src/test/ui/pattern/bindings-after-at
Esteban Küber 520461f1fb Provide suggestions for some moved value errors
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-24 17:42:26 -07:00
..
bind-by-move-neither-can-live-while-the-other-survives-1.rs move_ref_pattern: change pov in diagnostics & add binding names 2020-02-02 17:58:15 +01:00
bind-by-move-neither-can-live-while-the-other-survives-1.stderr Provide suggestions for some moved value errors 2020-06-24 17:42:26 -07:00
bind-by-move-no-subbindings-fun-param.rs move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
bind-by-move-no-subbindings-fun-param.stderr move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
borrowck-move-and-move.rs move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
borrowck-move-and-move.stderr move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
borrowck-pat-at-and-box-pass.rs move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
borrowck-pat-at-and-box.rs borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
borrowck-pat-at-and-box.stderr borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
borrowck-pat-by-copy-bindings-in-at.rs slice_patterns: remove gates in tests 2020-01-18 19:33:47 +01:00
borrowck-pat-by-move-and-ref-inverse-promotion.rs move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
borrowck-pat-by-move-and-ref-inverse-promotion.stderr Fix error message 2020-02-21 22:43:51 +01:00
borrowck-pat-by-move-and-ref-inverse.rs move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
borrowck-pat-by-move-and-ref-inverse.stderr Provide suggestions for some moved value errors 2020-06-24 17:42:26 -07:00
borrowck-pat-by-move-and-ref.rs move_ref_pattern: change pov in diagnostics & add binding names 2020-02-02 17:58:15 +01:00
borrowck-pat-by-move-and-ref.stderr move_ref_pattern: change pov in diagnostics & add binding names 2020-02-02 17:58:15 +01:00
borrowck-pat-ref-both-sides.rs slice_patterns: remove gates in tests 2020-01-18 19:33:47 +01:00
borrowck-pat-ref-mut-and-ref.rs borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
borrowck-pat-ref-mut-and-ref.stderr borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
borrowck-pat-ref-mut-twice.rs borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
borrowck-pat-ref-mut-twice.stderr borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
box-patterns.rs test(pattern): add tests for combinations of pattern features 2020-03-04 01:17:41 -06:00
copy-and-move-mixed.rs move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
copy-and-move-mixed.stderr move_ref_patterns: introduce tests 2020-02-02 14:13:07 +01:00
default-binding-modes-both-sides-independent.rs borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
default-binding-modes-both-sides-independent.stderr borrowck: prefer "value" over "_". 2020-03-25 11:42:25 +01:00
feature-gate-bindings_after_at.rs Introduce #![feature(bindings_after_at)]. 2019-12-23 14:47:19 +01:00
feature-gate-bindings_after_at.stderr --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
nested-binding-mode-lint.rs Don't parse mut a @ b as mut a @ mut b 2020-02-09 13:19:06 +00:00
nested-binding-modes-mut.rs Don't parse mut a @ b as mut a @ mut b 2020-02-09 13:19:06 +00:00
nested-binding-modes-mut.stderr Don't parse mut a @ b as mut a @ mut b 2020-02-09 13:19:06 +00:00
nested-binding-modes-ref.rs Don't parse mut a @ b as mut a @ mut b 2020-02-09 13:19:06 +00:00
nested-binding-modes-ref.stderr Don't parse mut a @ b as mut a @ mut b 2020-02-09 13:19:06 +00:00
nested-patterns.rs Remove bindings_after_at from INCOMPLETE_FEATURES. 2019-12-23 14:47:20 +01:00
nested-type-ascription-syntactically-invalid.rs Remove bindings_after_at from INCOMPLETE_FEATURES. 2019-12-23 14:47:20 +01:00
nested-type-ascription-syntactically-invalid.stderr Remove bindings_after_at from INCOMPLETE_FEATURES. 2019-12-23 14:47:20 +01:00
or-patterns-box-patterns.rs test(pattern): add tests for combinations of pattern features 2020-03-04 01:17:41 -06:00
or-patterns-slice-patterns.rs test(pattern): harden tests for or-patterns with slice-patterns 2020-03-04 01:33:32 -06:00
or-patterns.rs test(pattern): add tests for combinations of pattern features 2020-03-04 01:17:41 -06:00
pat-at-same-name-both.rs Remove or_patterns from INCOMPLETE_FEATURES 2020-02-01 22:07:11 +00:00
pat-at-same-name-both.stderr Remove or_patterns from INCOMPLETE_FEATURES 2020-02-01 22:07:11 +00:00
slice-patterns.rs test(pattern): add tests for combinations of pattern features 2020-03-04 01:17:41 -06:00
wild-before-at-syntactically-rejected.rs Test that _ @ subpat is syntactically rejected. 2019-12-23 14:47:20 +01:00
wild-before-at-syntactically-rejected.stderr Test that _ @ subpat is syntactically rejected. 2019-12-23 14:47:20 +01:00