-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nr2 unit struct #3299
Draft
P-E-P
wants to merge
7
commits into
Rust-GCC:master
Choose a base branch
from
P-E-P:fix-nr2-unit-struct
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fix nr2 unit struct #3299
Conversation
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
The hir dump was trying to visit init expression and types even when those were missing. gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::visit): Add check for type and initial expression. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
P-E-P
force-pushed
the
fix-nr2-unit-struct
branch
from
December 10, 2024 13:25
3edeca7
to
4c4a569
Compare
Labels were using the wrong namespace. gcc/rust/ChangeLog: * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Change label push function from type rib to label rib. * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): Likewise. (ResolveItem::visit): Likewise. (ResolveExternItem::visit): Likewise. * resolve/rust-ast-resolve-stmt.h: Likewise. * resolve/rust-ast-resolve.cc (NameResolution::go): Likewise. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
P-E-P
force-pushed
the
fix-nr2-unit-struct
branch
from
December 11, 2024 12:45
b490ffd
to
9d29160
Compare
It might be necessary to compare both name resolution' internal states during the transition. This new debug representation could help with that. gcc/rust/ChangeLog: * resolve/rust-name-resolver.h: Add new degug dump for old name resolver. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
We missed the name namespace for unit struct in the old resolver. gcc/rust/ChangeLog: * resolve/rust-ast-resolve-toplevel.h: Add struct to name namespace. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
Label scope is for ex: Edit: ah, I see |
Most of the edits here look like they only apply to nr1 |
This PR isn't finished yet. Basically I stumbled on a problem for NR2, and discovered that this problem should apply on NR1. So I fixed NR1 then I changed the behavior for both NR. |
Query mode was a hack to catch up some compile errors early, it was deemed to be removed at some time. Recent changes to NR1 highlighted an incompatibility with it hence it's removal. gcc/rust/ChangeLog: * backend/rust-compile-item.h: Remove query mode. * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): Likewise. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
Those test are now passing. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove passing tests. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
We're reusing the value, it could therefore not be taken be should be cloned. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Clone expr instead of taking it. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.