gccrs: Make globbing definition shadowable by default
commit16e00f3b14cf5a36624c287cfcded74a38b55212
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 15 Jan 2024 15:34:36 +0000 (15 16:34 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 1 Aug 2024 14:52:26 +0000 (1 16:52 +0200)
treeb3b82064b22289fcd8488fd658a5858577b0703b
parentf9ad1c29376e06950c3065f574f2df96b3265416
gccrs: Make globbing definition shadowable by default

Elements from glob use declaration shall be shadowable by default.

gcc/rust/ChangeLog:

* resolve/rust-forever-stack.h: Add a new function prototype to insert
a shadowable definition.
* resolve/rust-forever-stack.hxx: Add the new insert_shadowable
function to insert shadowable definition into the forever stack.
* resolve/rust-name-resolution-context.cc (NameResolutionContext::insert_shadowable):
Likewise with the name resolution context.
* resolve/rust-name-resolution-context.h: Add name resolution context
insert_shadowable member function prototype.
* resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::visit):
Insert shadowable definition into the forever stack for glob use
declaration.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/resolve/rust-forever-stack.h
gcc/rust/resolve/rust-forever-stack.hxx
gcc/rust/resolve/rust-name-resolution-context.cc
gcc/rust/resolve/rust-name-resolution-context.h
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc