-
Notifications
You must be signed in to change notification settings - Fork 173
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 use declaration import #3499
base: master
Are you sure you want to change the base?
Conversation
@@ -49,62 +49,5 @@ class GlobbingVisitor : public AST::DefaultASTVisitor | |||
NameResolutionContext &ctx; | |||
}; | |||
|
|||
// TODO: Fix documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I rename the file ? This pass technically does not exist anymore.
Import mapping was relying on resolve_path which in turn relies on the cursor function. This means the mapping resolver should be called from the correct scope instead of being called from the crate scope. gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::Early): Move the top level visitor from the function scope to attributes. (Early::go): Remove top level visitor creation and adapt calling code. Remove call to mapping resolution and import finalization. (Early::finalize_simple_import): Move the finalization from it's visitor. (Early::finalize_glob_import): Likewise. (Early::finalize_rebind_import): Likewise. (Early::visit): Add mapping resolution and finalization in UseDeclaration visitor function. * resolve/rust-finalize-imports-2.0.cc (finalize_simple_import): Move function. (finalize_glob_import): Likewise. (finalize_rebind_import): Likewise. (FinalizeImports::visit): Remove call to finalizers. * resolve/rust-early-name-resolver-2.0.h (class Early): Add top level attribute. * resolve/rust-finalize-imports-2.0.h: Add function prototypes. * resolve/rust-toplevel-name-resolver-2.0.h: Change getter return type to reference. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove issue-1786 and issue-3033 from exclusion list. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
This visitor is not used anymore. gcc/rust/ChangeLog: * resolve/rust-finalize-imports-2.0.cc (FinalizeImports::FinalizeImports): Remove constructor. (FinalizeImports::go): Remove function. (FinalizeImports::visit): Likewise. * resolve/rust-finalize-imports-2.0.h (class FinalizeImports): Remove FinalizeImports class. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM at first glance! I'm not sure I understand if there is still a fixed-point going on, but the fact that two new tests are passing is reassuring. good job!
Fixes #3487