-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes some tests appearing with a moved variant
A variant being moved lead to a null being created and a segfault later down the line. gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): Call getter instead of size function. * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Only check privacy if the type is present. * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Use an optional. * hir/tree/rust-hir-generic-param.h: Assert type before getting it. * hir/tree/rust-hir-item.h: Assert pointers before dereference, fix has_type condition. * hir/tree/rust-hir-path.h: Add more assertions. * hir/tree/rust-hir-stmt.cc: Change constructor with optionals. * hir/tree/rust-hir-stmt.h: Use optionals over smart pointers to emphasize these fields might be missing. * hir/tree/rust-hir.cc (LetStmt::as_string): Use getters. * typecheck/rust-hir-type-check-expr.cc: Clone structures to prevent parent's fields from being nulled by the move operation. * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Use optionals. * typecheck/rust-tyty.cc: Likewise. * typecheck/rust-tyty.h: Likewise. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
- Loading branch information
Showing
13 changed files
with
189 additions
and
66 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
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
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
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
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
Oops, something went wrong.