Conversation
|
The CI does not pass, you'll have to fix whatever is required to make it green. Even though the CI is green about the commit format I believe your lines are too long, you need to wrap your text at col 50 for the title and 72 for the text. I've seen that most of your recent contributions are AI generated, make sure you have taken a look at GCC's ai policy https://gcc.gnu.org/ai-policy.html |
528613e to
bd2bcc4
Compare
|
| void mark_hir_id (HirId); | ||
| bool visit_path_segment (HIR::PathExprSegment); | ||
| void find_value_definition (NodeId ast_node_id, NodeId &ref_node_id); | ||
| bool find_value_definition (NodeId ast_node_id, NodeId &ref_node_id); |
There was a problem hiding this comment.
this can just return the optional<NodeId> instead of a boolean and updating the given reference
|
Thanks — updated I also rewrote both branch commits with the repository-accepted public email and matching DCO sign-offs after the commit-format checks rejected GitHub noreply addresses. Validation:
The focused compiler build was not rerun in this constrained review environment; the Alpine job failure was an infrastructure timeout while downloading |
Name resolution reports an error for unresolved paths, but MarkLive still visits their lowered HIR nodes. Treat a missing definition as an already-diagnosed path and stop processing it instead of asserting. Fixes Rust-GCC#4670 gcc/rust/ChangeLog: * checks/lints/rust-lint-marklive.cc (MarkLive::visit): Return on an unresolved path. (MarkLive::find_value_definition): Return whether lookup succeeded. * checks/lints/rust-lint-marklive.h (MarkLive::find_value_definition): Change return type. gcc/testsuite/ChangeLog: * rust/compile/issue-4670.rs: New test. Signed-off-by: w3lld1 <faststepbyme@gmail.com>
gcc/rust/ChangeLog: * checks/lints/rust-lint-marklive.cc (MarkLive::find_value_definition): Return an optional NodeId. (MarkLive::visit): Consume the optional definition. * checks/lints/rust-lint-marklive.h (MarkLive::find_value_definition): Update declaration. Signed-off-by: w3lld1 <faststepbyme@gmail.com>
b447a3b to
9f2f569
Compare
Signed-off-by: w3lld1 <42353747+w3lld1@users.noreply.github.com>
|
@w3lld1 the CI still fails during the testsuite on all platforms, not just Alpine. Please make sure the tests pass either by running them locally or by using our CI if needed. Please also familiarize yourself with our AI policy just in case: https://gcc.gnu.org/ai-policy.html |
Fixes #4670
Name resolution already diagnoses the unknown enum variant in the match guard, but the lowered unresolved path still reached
MarkLive, where a successful definition lookup was asserted. This change treats a missing definition as an already-diagnosed path and stops processing that expression instead of triggering an ICE.I added a compile regression test for the reduced reproducer and its expected E0433 diagnostic.
Validation:
rust/rust-lint-marklive.oclang-format16 dry-run on both changed C++ filescontrib/gcc-changelog/git_check_commit.py origin/master..HEADgit diff --check origin/master...HEADThe complete
make check-rustsuite is deferred to CI; the local compiler build exceeded the bounded run time after the changed translation unit compiled successfully.Checklist:
make check-rustpasses locally (deferred to CI)clang-formatgcc/testsuite/rust/