aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-10-11 11:39:15 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2023-02-21 12:36:33 +0100
commit295cd26508882551111817f2216ecfbb2f4c467b (patch)
tree6f74ad58bfe796c20fefc4a394f0f28cefa3a176 /gcc/rust
parenta08f265625e525fa937dd6bc59f37da122df9f82 (diff)
downloadgcc-295cd26508882551111817f2216ecfbb2f4c467b.zip
gcc-295cd26508882551111817f2216ecfbb2f4c467b.tar.gz
gcc-295cd26508882551111817f2216ecfbb2f4c467b.tar.bz2
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.
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-item.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-item.cc b/gcc/rust/resolve/rust-ast-resolve-item.cc
index e5eb6e4..193e683 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);
}