-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #104086, Tighten the 'introduce new binding' suggestion
- Loading branch information
1 parent
bc2504a
commit 952df48
Showing
3 changed files
with
109 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// error-pattern: not found in this scope | ||
|
||
fn main() { | ||
x = x = x; | ||
x = y = y = y; | ||
x = y = y; | ||
x = x = y; | ||
x = x; // will suggest add `let` | ||
x = y // will suggest add `let` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:4:5 | ||
| | ||
LL | x = x = x; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:4:9 | ||
| | ||
LL | x = x = x; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:4:13 | ||
| | ||
LL | x = x = x; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:5:5 | ||
| | ||
LL | x = y = y = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `y` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:5:9 | ||
| | ||
LL | x = y = y = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `y` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:5:13 | ||
| | ||
LL | x = y = y = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `y` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:5:17 | ||
| | ||
LL | x = y = y = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:6:5 | ||
| | ||
LL | x = y = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `y` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:6:9 | ||
| | ||
LL | x = y = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `y` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:6:13 | ||
| | ||
LL | x = y = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:7:5 | ||
| | ||
LL | x = x = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `x` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:7:9 | ||
| | ||
LL | x = x = y; | ||
| ^ not found in this scope | ||
|
||
error[E0425]: cannot find value `y` in this scope | ||
--> $DIR/issue-104086-suggest-let.rs:7:13 | ||
| | ||
LL | x = x = y; | ||
| ^ not found in this scope | ||
|
||
error: aborting due to 13 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |