1
Fork 0

Rollup merge of #84172 - jayaddison:compiler/E0384-reduce-assertiveness, r=petrochenkov

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.

Resolves #84144
This commit is contained in:
Dylan DPC 2021-04-16 14:08:33 +02:00 committed by GitHub
commit c7c59d7c3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 36 additions and 36 deletions

View file

@ -1681,7 +1681,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
if decl.can_be_made_mutable() {
err.span_suggestion(
decl.source_info.span,
"make this binding mutable",
"consider making this binding mutable",
format!("mut {}", name),
Applicability::MachineApplicable,
);