Skip to content

Conversation

philberty
Copy link
Member

@philberty philberty commented Sep 17, 2023

Fixes #2391

gcc/rust/ChangeLog:

* Make-lang.in: fixup formatting
* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): remove old check
* rust-session-manager.cc (Session::compile_crate): call new lint
* resolve/rust-ast-verify-assignee.h: Removed.
* checks/errors/rust-readonly-check.cc: New file.
* checks/errors/rust-readonly-check.h: New file.

gcc/testsuite/ChangeLog:

* rust/compile/wrong_lhs_assignment.rs: update error message
* rust/compile/issue-2391.rs: New test.

…hecks

Fixes #2391

gcc/rust/ChangeLog:

	* Make-lang.in: fixup formatting
	* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): remove old check
	* rust-session-manager.cc (Session::compile_crate): call new lint
	* resolve/rust-ast-verify-assignee.h: Removed.
	* checks/errors/rust-readonly-check.cc: New file.
	* checks/errors/rust-readonly-check.h: New file.

gcc/testsuite/ChangeLog:

	* rust/compile/wrong_lhs_assignment.rs: update error message
	* rust/compile/issue-2391.rs: New test.

Signed-off-by: Philip Herron <[email protected]>
@philberty philberty added the diagnostic diagnostic static analysis label Sep 17, 2023
@philberty philberty added this to the GCC 14 Stage 3 milestone Sep 17, 2023
@philberty philberty enabled auto-merge September 17, 2023 19:24
@philberty philberty added this pull request to the merge queue Sep 17, 2023
Merged via the queue into master with commit f9455fb Sep 17, 2023
@dkm dkm deleted the phil/lvalue-readonly branch September 17, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostic diagnostic static analysis
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Invalid LHS Of Assignment
1 participant