aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-rib.cc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-08-02 16:57:09 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:04:33 +0100
commitc8911dde92a98f1c9230a04c62a5287b562bc720 (patch)
tree047dcd5a581084b8fc30514dc286b060f258115e /gcc/rust/resolve/rust-rib.cc
parentccef457297594c5eadf57ec402122f260c1edc8f (diff)
downloadgcc-c8911dde92a98f1c9230a04c62a5287b562bc720.zip
gcc-c8911dde92a98f1c9230a04c62a5287b562bc720.tar.gz
gcc-c8911dde92a98f1c9230a04c62a5287b562bc720.tar.bz2
gccrs: Move extern crate resolving
Move extern crate resolving under the extern crate declaration instead of doing it under the crate's root as extern crates are not resolved by the top level resolver. gcc/rust/ChangeLog: * metadata/rust-extern-crate.cc (ExternCrate::ExternCrate): Update definition to allow Extern crate with no content (pure proc macros). (ExternCrate::ok): Panic on no content. (ExternCrate::load): Likewise. * metadata/rust-extern-crate.h: Update prototypes. * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::go): Remove macro resolution. (TopLevel::visit): Likewise. * resolve/rust-toplevel-name-resolver-2.0.h: Add visit prototype for extern crate. * rust-session-manager.cc (Session::load_extern_crate): Adapt content depending on the loaded crate's content. * util/rust-hir-map.cc (Mappings::lookup_derive_proc_macros): Change return type to optional because it is way more convenient. (Mappings::lookup_bang_proc_macros): Likewise. (Mappings::lookup_attribute_proc_macros): Likewise. * util/rust-hir-map.h: Update function prototypes. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve/rust-rib.cc')
0 files changed, 0 insertions, 0 deletions