From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 4993E3858418; Fri, 14 Oct 2022 15:58:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4993E3858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665763112; bh=b6vbUcHiRrT4ZnNcNq0/FwteSQ00N7gf4bBPkVZ/TSQ=; h=From:To:Subject:Date:From; b=DiEt0Wgwe0e3h5AHUgS48FM/51vn+u8cbsgOPh2Q5qG1VGBBgDcj1AKZ56JnXRsEp mwxktFzZfSQVU4sTn1ZZJnZeXVuSEAOBLhWY3eHUwGQNkEnkgf2pNxBHVlkSYlEFzJ MbHGR6198Ze9+hWXpshXnfeYkcNJ7x46bzaDpNkc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] rust-ast-resolve-item: Add note about resolving glob uses X-Act-Checkin: gcc X-Git-Author: Arthur Cohen X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: 5346330e869e7230164b14e04e18b0d74e80901a X-Git-Newrev: 3dc104bc8aaf3edf7aa59b11efacdd9349054df7 Message-Id: <20221014155832.4993E3858418@sourceware.org> Date: Fri, 14 Oct 2022 15:58:31 +0000 (GMT) List-Id: https://gcc.gnu.org/g:3dc104bc8aaf3edf7aa59b11efacdd9349054df7 commit 3dc104bc8aaf3edf7aa59b11efacdd9349054df7 Author: Arthur Cohen Date: Tue Oct 11 11:39:15 2022 +0200 rust-ast-resolve-item: Add note about resolving glob uses 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 0c38f28d530..7f45161fa14 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); }