diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-09-17 20:11:23 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 19:04:37 +0100 |
commit | e47a980566050a290e1fbf9fb4792065ea772a47 (patch) | |
tree | 3ef43e89a2592692ac89240d0f108f89cb5c1100 /gcc/rust/Make-lang.in | |
parent | 718b65a93d194a97a88f96780b97023ce9ed9378 (diff) | |
download | gcc-e47a980566050a290e1fbf9fb4792065ea772a47.zip gcc-e47a980566050a290e1fbf9fb4792065ea772a47.tar.gz gcc-e47a980566050a290e1fbf9fb4792065ea772a47.tar.bz2 |
gccrs: port over readonly_error from c-family for lvalue assignment checks
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 <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/Make-lang.in')
-rw-r--r-- | gcc/rust/Make-lang.in | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index 25ead23..85da9b2 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -86,12 +86,12 @@ GRS_OBJS = \ rust/rust-compile-resolve-path.o \ rust/rust-macro-expand.o \ rust/rust-cfg-strip.o \ - rust/rust-expand-visitor.o \ - rust/rust-ast-builder.o \ - rust/rust-derive.o \ - rust/rust-derive-clone.o \ - rust/rust-derive-copy.o \ - rust/rust-proc-macro.o \ + rust/rust-expand-visitor.o \ + rust/rust-ast-builder.o \ + rust/rust-derive.o \ + rust/rust-derive-clone.o \ + rust/rust-derive-copy.o \ + rust/rust-proc-macro.o \ rust/rust-macro-invoc-lexer.o \ rust/rust-proc-macro-invoc-lexer.o \ rust/rust-macro-substitute-ctx.o \ @@ -101,19 +101,19 @@ GRS_OBJS = \ rust/rust-attributes.o \ rust/rust-abi.o \ rust/rust-token-converter.o \ - rust/rust-macro.o \ + rust/rust-macro.o \ rust/rust-ast-lower.o \ rust/rust-ast-lower-base.o \ rust/rust-ast-lower-pattern.o \ rust/rust-ast-lower-item.o \ rust/rust-ast-lower-expr.o \ rust/rust-ast-lower-type.o \ - rust/rust-ast-lower-stmt.o \ - rust/rust-rib.o \ - rust/rust-name-resolution-context.o \ - rust/rust-default-resolver.o \ + rust/rust-ast-lower-stmt.o \ + rust/rust-rib.o \ + rust/rust-name-resolution-context.o \ + rust/rust-default-resolver.o \ rust/rust-toplevel-name-resolver-2.0.o \ - rust/rust-early-name-resolver-2.0.o \ + rust/rust-early-name-resolver-2.0.o \ rust/rust-early-name-resolver.o \ rust/rust-name-resolver.o \ rust/rust-ast-resolve.o \ @@ -160,6 +160,7 @@ GRS_OBJS = \ rust/rust-const-checker.o \ rust/rust-lint-marklive.o \ rust/rust-lint-unused-var.o \ + rust/rust-readonly-check.o \ rust/rust-hir-type-check-path.o \ rust/rust-unsafe-checker.o \ rust/rust-compile-intrinsic.o \ |