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]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.
Commit on github:
https://github.com/Rust-GCC/gccrs/commit/87c7e4274d1a6b4383b3426ad62101750186ec12
The commit has NOT been mentioned in any issue.
The commit has been mentioned in the following pull-request(s):
- https://github.com/Rust-GCC/gccrs/pull/4588
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 64fd8e221..e70a981be 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.54.0