]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: resolver: Refactor assertion
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 28 Aug 2023 08:54:12 +0000 (10:54 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:04:33 +0000 (19:04 +0100)
commit342b071a0fac00d8acf745348c41afcd48cdb4cb
treef9f33064139d7eddb76bba85020d23896990f651
parentc8911dde92a98f1c9230a04c62a5287b562bc720
gccrs: resolver: Refactor assertion

Change the condition with rust_unreachable to an assertion. This will
keep the code clean and concise.
Some styling issues appeared during review, this commit make the code
more readable.

gcc/rust/ChangeLog:

* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
Change to assertion.
* util/rust-hir-map.cc (Mappings::lookup_derive_proc_macros):
Add empty line.
(Mappings::lookup_bang_proc_macros): Likewise.
(Mappings::lookup_attribute_proc_macros): Likewise.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
gcc/rust/util/rust-hir-map.cc