]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix narrowing conversion warnings
authorOwen Avery <powerboat9.gamer@gmail.com>
Thu, 17 Apr 2025 02:53:18 +0000 (22:53 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 28 Apr 2025 14:19:30 +0000 (16:19 +0200)
commitbeced835afa3908aa94550d2ca5ee3879a620adb
tree7930afd92c2d4fcd31f933132add6ad63ea1abe5
parent4ea730498d2685cf7675edf81496113fbbb95901
gccrs: 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