From: Pierre-Emmanuel Patry <[email protected]>
This path was not documented and usually unexpected. It lead to various
headache during debugging sessions as the nullopt return value look
out of place.
gcc/rust/ChangeLog:
* resolve/rust-name-resolution-context.hxx: Document non glob container
path.
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
Tested on x86_64-pc-linux-gnu.
---
gcc/rust/resolve/rust-name-resolution-context.hxx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/rust/resolve/rust-name-resolution-context.hxx
b/gcc/rust/resolve/rust-name-resolution-context.hxx
index f5af7b3fa67..a92f15d7b40 100644
--- a/gcc/rust/resolve/rust-name-resolution-context.hxx
+++ b/gcc/rust/resolve/rust-name-resolution-context.hxx
@@ -345,6 +345,10 @@ NameResolutionContext::resolve_segments (
}
else
{
+ // Non glob containers such as structures, we insert the
+ // segment but we let the type checker handle the rest since
+ // it has to resolve methode resolution & cie
+
// FIXME: Resolve segments always resolves in the Types NS
// correct? If so, we should remove the template parameter for
// this function - and use NS::Types directly here instead of
--
2.55.0