-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gccrs: [E0070] invalid left-hand side of assignment
gcc/rust/ChangeLog: * resolve/rust-ast-verify-assignee.h: called error function. gcc/testsuite/ChangeLog: * rust/compile/wrong_lhs_assignment.rs: New test. Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
- Loading branch information
1 parent
f7a29f5
commit a06cec1
Showing
2 changed files
with
8 additions
and
1 deletion.
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,7 @@ | ||
fn foo() { | ||
1 = 3; // { dg-error "invalid left-hand side of assignment" } | ||
} | ||
|
||
fn main() { | ||
foo(); | ||
} |