From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 679C83854811 for ; Tue, 21 Feb 2023 12:03:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 679C83854811 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x436.google.com with SMTP id z8so3882577wrm.8 for ; Tue, 21 Feb 2023 04:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=klE7pGoD1SIEPTpYZuJlAwv0JaPCHEP6htefXjZ+BGA=; b=LRbWVdQu8AR89cP2/eZlPGu9VYQ5W5KDzGQ9jlW7JqbpQ0/tJkpYF1ks2MS508n5bf rmTXsU6ZDLJglfhKc25q6BJ9Ejg4Th6wBnY+JRDyWw405GTQW0RApfrYeHyB5VaTPW2M 9P3sTckWGCONKzs7PT3c1NryAFrTcJGBffYJCcQ0Krt/XgX55eXy31Z+RnTpezXctQ8r 8GBQJl+5CiNueK03eRZH6kwtsjONHas0lmKN/FZkn54c0vtBm34bB4+0RnFkV1vFmqna mBp6AJrr75ElBXZe8DUdrhEVL2ModEgfa3fIE+lFlPlzSn7aLvQrG7Fz6/K/VJCKTAFW SFkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=klE7pGoD1SIEPTpYZuJlAwv0JaPCHEP6htefXjZ+BGA=; b=geGOOnYjkays+am/W5xm0hC0hPvrmuVQT9cpV4qkB87nEzxUAbzdIIjV7x2iQDJkD6 wpumoz6bP8wvP54Z1RIAC1X0JXGG06In6Mb3D1eEWKZPCAuTphpD3CnHZg0pvuLHyMrR ZSfD+KOwibjACnD4nlWNgLw9HiM0Xyxri5xN9X7LhZJmC5M25tSVqjC8VU/bow5pZ1Y7 uIsJYGKpj21xSniVaNgQ1kR53R8SLlgACNmR31ag/iexcYAqQC+PMQ053alA/IUIU2WA MeHTJxo8kuQsle6zPZGtLnTsON0fnCVmKx0OzUf0TP0B521qVJAzt/S8/KdNhvXN68M4 wX0g== X-Gm-Message-State: AO0yUKWDlZ38TPJojDPuh2i6cNBD+XnN21ZvuCh2Py7hxmsUnSY/uMhH wtzz6FP3Ew7F73pTzvIJvWva/LB2Vb/71HV31g== X-Google-Smtp-Source: AK7set9sJKWVQ7H/HQVdlU+RBgrPWDsTClmj5ZRQ8cZdvqhiud6YsY6JOkrugRZVQsXga2NiPnlFCw== X-Received: by 2002:a5d:5a9a:0:b0:2c5:5878:e5ad with SMTP id bp26-20020a5d5a9a000000b002c55878e5admr2563142wrb.33.1676981017984; Tue, 21 Feb 2023 04:03:37 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c15-20020adffb4f000000b002c55b0e6ef1sm5013811wrs.4.2023.02.21.04.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:03:37 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [committed 018/103] gccrs: rust-ast-resolve-item: Add note about resolving glob uses Date: Tue, 21 Feb 2023 13:01:08 +0100 Message-Id: <20230221120230.596966-19-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221120230.596966-1-arthur.cohen@embecosm.com> References: <20230221120230.596966-1-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Add note for glob import resolving. --- 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); } -- 2.39.1