-
Notifications
You must be signed in to change notification settings - Fork 184
nr1.0: Remove #4051
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
Open
powerboat9
wants to merge
2
commits into
Rust-GCC:master
Choose a base branch
from
powerboat9:remove-nr1
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.
Open
nr1.0: Remove #4051
Conversation
This file contains hidden or 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
gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-internal.h (BuilderContext::resolver): Remove member variable. (BuilderContext::BuilderContext): Remove initialization of resolver member variable. (AbstractBuilder::resolve_label): Assume nr2.0 is enabled. (AbstractBuilder::resolve_variable): Likewise. (AbstractBuilder::resolve_variable_or_fn): Likewise. * checks/errors/privacy/rust-privacy-check.cc (Resolver::resolve): Avoid passing the 1.0 name resolver to VisibilityResolver or PrivacyReporter. * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::PrivacyReporter): Remove initialization of resolver field. (is_child_module): Assume nr2.0 is enabled. (PrivacyReporter::check_for_privacy_violation): Likewise. * checks/errors/privacy/rust-privacy-reporter.h (PrivacyReporter::PrivacyReporter): Remove 1.0 resolver parameter. (PrivacyReporter::resolver): Remove member variable. * checks/errors/privacy/rust-visibility-resolver.cc: Remove "options.h" inclusion. (VisibilityResolver::VisibilityResolver): Remove 1.0 resolver parameter. (VisibilityResolver::resolve_module_path): Assume nr2.0 is enabled. * checks/errors/privacy/rust-visibility-resolver.h (VisibilityResolver::VisibilityResolver): Remove 1.0 resolver parameter. (VisibilityResolver::resolver): Remove member variable. * checks/errors/rust-const-checker.cc: Remove "options.h" inclusion. (ConstChecker::ConstChecker): Remove 1.0 resolver parameter. (ConstChecker::visit): Assume nr2.0 is enabled. * checks/errors/rust-const-checker.h (ConstChecker::resolver): Remove member variable. * checks/errors/rust-hir-pattern-analysis.cc: Remove "options.h" inclusion. (PatternChecker::PatternChecker): Remove 1.0 resolver parameter. (PatternChecker::visit): Assume nr2.0 is enabled. * checks/errors/rust-hir-pattern-analysis.h (PatternChecker::resolver): Remove member variable. * checks/errors/rust-readonly-check2.cc (ReadonlyChecker::ReadonlyChecker): Remove initialization of resolver member variable. * checks/errors/rust-readonly-check2.h (ReadonlyChecker::resolver): Remove member variable. * checks/errors/rust-unsafe-checker.cc: Remove "options.h" inclusion. (UnsafeChecker::UnsafeChecker): Remove 1.0 resolver parameter. (UnsafeChecker::visit): Assume nr2.0 is enabled. * checks/errors/rust-unsafe-checker.h (UnsafeChecker::resolver): Remove member variable. * checks/lints/rust-lint-marklive.cc (MarkLive::visit_path_segment): Assume nr2.0 is enabled. (MarkLive::visit): Likewise. (MarkLive::find_ref_node_id): Likewise. * checks/lints/rust-lint-marklive.h (MarkLive::resolver): Remove member variable. (MarkLive::MarkLive): Remove initialization of resolver member variable. * checks/lints/rust-lint-scan-deadcode.h (ScanDeadCode::resolver): Remove member variable. (ScanDeadCode::ScanDeadCode): Remove initialization of resolver member variable. Signed-off-by: Owen Avery <[email protected]>
This patch removes the old name resolver, leaving only the 2.0 name resolver. gcc/rust/ChangeLog: * Make-lang.in (GRS_OBJS): Remove entries for deleted files. * expand/rust-macro-builtins-helpers.h: Remove inclusion of "rust-early-name-resolver.h". * expand/rust-macro-builtins.cc: Likewise. * expand/rust-macro-expand.cc: Likewise. (MacroExpander::expand_crate): Remove usage of nr1.0 resolver. * expand/rust-macro-expand.h: Remove inclusion of "rust-early-name-resolver.h". (MacroExpander::MacroExpander): Remove initialization of resolver member variable. (MacroExpander::resolver): Remove member variable. * lang.opt (frust-name-resolution-2.0): Remove option. * resolve/rust-name-resolver.cc: Remove inclusion of "options.h". (Resolver::Resolver): Remove member function definition. (Resolver::get): Likewise. (Resolver::push_new_name_rib): Likewise. (Resolver::push_new_type_rib): Likewise. (Resolver::push_new_label_rib): Likewise. (Resolver::push_new_macro_rib): Likewise. (Resolver::find_name_rib): Likewise. (Resolver::find_type_rib): Likewise. (Resolver::find_macro_rib): Likewise. (Resolver::insert_builtin_types): Likewise. (Resolver::get_builtin_types): Likewise. (Resolver::generate_builtins): Likewise. (Resolver::setup_builtin): Likewise. (Resolver::insert_resolved_name): Likewise. (Resolver::lookup_resolved_name): Likewise. (Resolver::insert_resolved_type): Likewise. (Resolver::lookup_resolved_type): Likewise. (Resolver::insert_resolved_label): Likewise. (Resolver::lookup_resolved_label): Likewise. (Resolver::insert_resolved_macro): Likewise. (Resolver::lookup_resolved_macro): Likewise. (Resolver::insert_resolved_misc): Likewise. (Resolver::lookup_resolved_misc): Likewise. (Resolver::push_closure_context): Likewise. (Resolver::pop_closure_context): Likewise. (Resolver::insert_captured_item): Likewise. (Resolver::decl_needs_capture): Likewise. (Resolver::get_captures): Likewise. * resolve/rust-name-resolver.h (class Resolver): Remove. * rust-lang.cc: Remove inclusion of "rust-ast-resolve-item.h". (run_rust_tests): Remove call to rust_simple_path_resolve_test. * rust-session-manager.cc: Remove inclusions of "rust-ast-resolve.h" and "rust-early-name-resolver.h". (Session::compile_crate): Assume nr2.0 is enabled. (Session::expansion): Likewise. (Session::load_extern_crate): Likewise. * resolve/rust-ast-resolve-base.cc: Removed. * resolve/rust-ast-resolve-base.h: Removed. * resolve/rust-ast-resolve-expr.cc: Removed. * resolve/rust-ast-resolve-expr.h: Removed. * resolve/rust-ast-resolve-item.cc: Removed. * resolve/rust-ast-resolve-item.h: Removed. * resolve/rust-ast-resolve-path.cc: Removed. * resolve/rust-ast-resolve-path.h: Removed. * resolve/rust-ast-resolve-pattern.cc: Removed. * resolve/rust-ast-resolve-pattern.h: Removed. * resolve/rust-ast-resolve-stmt.cc: Removed. * resolve/rust-ast-resolve-stmt.h: Removed. * resolve/rust-ast-resolve-struct-expr-field.cc: Removed. * resolve/rust-ast-resolve-struct-expr-field.h: Removed. * resolve/rust-ast-resolve-toplevel.h: Removed. * resolve/rust-ast-resolve-type.cc: Removed. * resolve/rust-ast-resolve-type.h: Removed. * resolve/rust-ast-resolve.cc: Removed. * resolve/rust-ast-resolve.h: Removed. * resolve/rust-early-name-resolver.cc: Removed. * resolve/rust-early-name-resolver.h: Removed. Signed-off-by: Owen Avery <[email protected]>
CohenArthur
approved these changes
Aug 11, 2025
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.
let's go 🎉 🎉 🎉
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.
Depends on #4050