mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Remove ImportRefUsed (#3934)
This was to track use of a declaration after import, prior to a redeclaration. Per [discussion on Discord](https://discord.com/channels/655572317891461132/1217182321933815820/1236016521059237962), we likely don't need this check due to the change in behavior of `extern`. Rather than potentially getting one of many `extern` decls and depending on it by accident, it is now planned to be _required_ to be imported, and the library doing a non-`extern` decl must _know_ it's importing the `extern` decl. The stricter requirement on the library means it now seems more reasonable to use the `extern` decl. So kind of rolling back #3831, though keeping `ImportIRInstId` (at least for now) and keeping `Loaded`/`Unloaded` terminology (seems a nicer fit).
This commit is contained in:
@@ -195,8 +195,7 @@ auto DeclNameStack::ApplyNameQualifierTo(NameContext& name_context,
|
||||
if (TryResolveQualifier(name_context, loc_id)) {
|
||||
// For identifier nodes, we need to perform a lookup on the identifier.
|
||||
auto resolved_inst_id = context_->LookupNameInDecl(
|
||||
name_context.loc_id, name_id, name_context.target_scope_id,
|
||||
/*mark_imports_used=*/false);
|
||||
name_context.loc_id, name_id, name_context.target_scope_id);
|
||||
if (!resolved_inst_id.is_valid()) {
|
||||
// Invalid indicates an unresolved name. Store it and return.
|
||||
name_context.state = NameContext::State::Unresolved;
|
||||
|
||||
Reference in New Issue
Block a user