From ef74796178edd2cf28f17109083cbd235808f88d Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Fri, 18 Feb 2022 15:32:46 -0800 Subject: Change temporary variable name if it would conflict --- src/test/ui/parser/increment-autofix.stderr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test/ui/parser') diff --git a/src/test/ui/parser/increment-autofix.stderr b/src/test/ui/parser/increment-autofix.stderr index 8c934c9efde..04fd68ed85b 100644 --- a/src/test/ui/parser/increment-autofix.stderr +++ b/src/test/ui/parser/increment-autofix.stderr @@ -36,10 +36,10 @@ error: Rust has no postfix increment operator LL | tmp++; | ^^ not a valid postfix operator | -help: use `+= 1` instead (rename `tmp` so it doesn't conflict with your variable) +help: use `+= 1` instead | -LL | { let tmp = tmp; tmp += 1; tmp }; - | +++++++++++ ~~~~~~~~~~~~~~~~~ +LL | { let tmp_ = tmp; tmp += 1; tmp_ }; + | ++++++++++++ ~~~~~~~~~~~~~~~~~~ help: or, if you don't need to use it as an expression, change it to this | LL - tmp++; @@ -52,10 +52,10 @@ error: Rust has no postfix increment operator LL | while tmp++ < 5 { | ^^ not a valid postfix operator | -help: use `+= 1` instead (rename `tmp` so it doesn't conflict with your variable) +help: use `+= 1` instead | -LL | while { let tmp = tmp; tmp += 1; tmp } < 5 { - | +++++++++++ ~~~~~~~~~~~~~~~~~ +LL | while { let tmp_ = tmp; tmp += 1; tmp_ } < 5 { + | ++++++++++++ ~~~~~~~~~~~~~~~~~~ help: or, if you don't need to use it as an expression, change it to this | LL - while tmp++ < 5 { -- cgit 1.4.1-3-g733a5