From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7905) id A2FEB385842E; Tue, 21 Feb 2023 11:56:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2FEB385842E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676980604; bh=T+G5OadL95vOWH0IMTq65ziZa6Mx5H/SJpJH9ZBX/Mo=; h=From:To:Subject:Date:From; b=RLnYsZfjdJq64DWhrxMFk55N4KbjS2vLOqY/BkWy860Kztt88qCJW4m3BWDfwtTUp VG5J6t5dsmltz3X7OEzBJSp3FMER3/l9F2e6TnEJJU83/tikz8cSBh/GTEHZsbrmHs X+HwSwF4MBV1hrdAxtkzzr8EssbMRDwQ4oy0Ur20= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Arthur Cohen To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6171] gccrs: rust-ast-resolve-item: Add note about resolving glob uses X-Act-Checkin: gcc X-Git-Author: Arthur Cohen X-Git-Refname: refs/heads/master X-Git-Oldrev: a08f265625e525fa937dd6bc59f37da122df9f82 X-Git-Newrev: 295cd26508882551111817f2216ecfbb2f4c467b Message-Id: <20230221115644.A2FEB385842E@sourceware.org> Date: Tue, 21 Feb 2023 11:56:44 +0000 (GMT) List-Id: https://gcc.gnu.org/g:295cd26508882551111817f2216ecfbb2f4c467b commit r13-6171-g295cd26508882551111817f2216ecfbb2f4c467b Author: Arthur Cohen Date: Tue Oct 11 11:39:15 2022 +0200 gccrs: rust-ast-resolve-item: Add note about resolving glob uses gcc/rust/ChangeLog: * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Add note for glob import resolving. Diff: --- gcc/rust/resolve/rust-ast-resolve-item.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/rust/resolve/rust-ast-resolve-item.cc b/gcc/rust/resolve/rust-ast-resolve-item.cc index e5eb6e491e3..193e6834334 100644 --- a/gcc/rust/resolve/rust-ast-resolve-item.cc +++ b/gcc/rust/resolve/rust-ast-resolve-item.cc @@ -968,6 +968,14 @@ ResolveItem::visit (AST::UseDeclaration &use_item) { auto to_resolve = flatten_use_dec_to_paths (use_item); + // FIXME: I think this does not actually resolve glob use-decls and is going + // the wrong way about it. RFC #1560 specifies the following: + // + // > When we find a glob import, we have to record a 'back link', so that when + // a public name is added for the supplying module, we can add it for the + // importing module. + // + // Which is the opposite of what we're doing if I understand correctly? for (auto &path : to_resolve) ResolvePath::go (&path); }