]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Strong type ScopeId
authorKushal Pal <kushalpal109@gmail.com>
Wed, 7 Aug 2024 10:16:24 +0000 (10:16 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 19 Mar 2025 14:32:09 +0000 (15:32 +0100)
commit03fd4851cd271ab08089db7d4da68bed30ed3fdd
tree19bd4dcc7ef4dce0732557709cbb4dab50d17ce3
parent9104447577afbbd3229d353cf48e46eb105cd130
gccrs: Strong type ScopeId

gcc/rust/ChangeLog:

* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
(ExprStmtBuilder::setup_loop): Use value of ScopeId.
(ExprStmtBuilder::visit): Use continue scope id instead of
continue basic block id.
* checks/errors/borrowck/rust-bir-builder-internal.h: Use value
of ScopeId.
* checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Use
ROOT_VALUE instead of hardcoded 0.
(Dump::visit_scope): Use value of ScopeId.
* checks/errors/borrowck/rust-bir-place.h (struct ScopeId):
ScopeId is now a struct.
(std::numeric_limits::max): Set invalid ScopeId.

Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h
gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
gcc/rust/checks/errors/borrowck/rust-bir-place.h