From: Pierre-Emmanuel Patry <[email protected]>
Late name resolution was initially not run on extern crate since the
content within the functions was not used. But function return type is
resolved within the late name resolver hence why we cannot skip it.
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::load_extern_crate): Run late name
resolver on extern crates.
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
gcc/rust/rust-session-manager.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 64fd8e22139..e70a981be6b 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -1326,6 +1326,7 @@ Session::load_extern_crate (const std::string
&crate_name, location_t locus)
Resolver2_0::Early early (ctx);
early.go (parsed_crate);
+ Resolver2_0::Late (ctx).go (parsed_crate);
std::vector<AttributeProcMacro> attribute_macros;
std::vector<CustomDeriveProcMacro> derive_macros;
--
2.50.1