]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix narrowing conversion warnings
authorOwen Avery <powerboat9.gamer@gmail.com>
Thu, 17 Apr 2025 02:53:18 +0000 (22:53 -0400)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 28 Apr 2025 13:14:05 +0000 (13:14 +0000)
commit161e3c684cbe72cc1110687e497de0334b83745c
tree9d3513fd7e4111565b30075a0e3f808443c1e9a5
parent8166a86ae541c4d26f5aac8bbf51463dd5c0269e
Fix narrowing conversion warnings

Fixes PR#119641

gcc/rust/ChangeLog:

* checks/errors/borrowck/rust-bir-place.h
(IndexVec::size_type): Add.
(IndexVec::MAX_INDEX): Add.
(IndexVec::size): Change the return type to the type of the
internal value used by the index type.
(PlaceDB::lookup_or_add_variable): Use the return value from the
PlaceDB::add_place call.
* checks/errors/borrowck/rust-bir.h
(struct BasicBlockId): Move this definition before the
definition of the struct Function.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/checks/errors/borrowck/rust-bir-place.h
gcc/rust/checks/errors/borrowck/rust-bir.h