about summary refs log tree commit diff
path: root/src/test/ui/pattern/move-ref-patterns
diff options
context:
space:
mode:
authorJames Addison <jay@jp-hosting.net>2021-04-12 23:29:09 +0100
committerJames Addison <jay@jp-hosting.net>2021-04-12 23:29:09 +0100
commit0174dd6f921cc63c7e2d9aa5c01aa591f9a26745 (patch)
tree32bbfc38d809d4f2911b9a922e69e899689d6a71 /src/test/ui/pattern/move-ref-patterns
parentd0695c9081b16077d0aed368bccaf437d77ff497 (diff)
downloadrust-0174dd6f921cc63c7e2d9aa5c01aa591f9a26745.tar.gz
rust-0174dd6f921cc63c7e2d9aa5c01aa591f9a26745.zip
Compiler error messages: reduce assertiveness of message E0384
This message is emitted as guidance by the compiler when a developer attempts to reassign a value to an immutable variable.  Following the message will always currently work, but it may not always be the best course of action; following the 'consider ...' messaging pattern provides a hint to the developer that it could be wise to explore other alternatives.
Diffstat (limited to 'src/test/ui/pattern/move-ref-patterns')
-rw-r--r--src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr b/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr
index 285c203f382..d0726f05cc3 100644
--- a/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr
+++ b/src/test/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr
@@ -16,7 +16,7 @@ LL |     let [ref _x0_hold, _x1, ref xs_hold @ ..] = arr;
    |                        ---
    |                        |
    |                        first assignment to `_x1`
-   |                        help: make this binding mutable: `mut _x1`
+   |                        help: consider making this binding mutable: `mut _x1`
 LL |     _x1 = U;
    |     ^^^^^^^ cannot assign twice to immutable variable
 
@@ -74,7 +74,7 @@ LL |     let (ref _x0, _x1, ref _x2, ..) = tup;
    |                   ---
    |                   |
    |                   first assignment to `_x1`
-   |                   help: make this binding mutable: `mut _x1`
+   |                   help: consider making this binding mutable: `mut _x1`
 LL |     _x1 = U;
    |     ^^^^^^^ cannot assign twice to immutable variable