diff options
| author | James Addison <jay@jp-hosting.net> | 2021-04-12 23:29:09 +0100 |
|---|---|---|
| committer | James Addison <jay@jp-hosting.net> | 2021-04-12 23:29:09 +0100 |
| commit | 0174dd6f921cc63c7e2d9aa5c01aa591f9a26745 (patch) | |
| tree | 32bbfc38d809d4f2911b9a922e69e899689d6a71 /src/test/ui/pattern/move-ref-patterns | |
| parent | d0695c9081b16077d0aed368bccaf437d77ff497 (diff) | |
| download | rust-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.stderr | 4 |
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 |
