From: Pierre-Emmanuel Patry <[email protected]>

gcc/rust/ChangeLog:

        * util/bi-map.h: Add include directive for required declarations.
        * util/fnv-hash.h: Likewise.
        * util/rust-dump.h: Likewise.
        * util/rust-inline-visitor.h: Likewise.
        * util/rust-unwrap-segment.h: Likewise.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
 gcc/rust/util/bi-map.h              | 1 +
 gcc/rust/util/fnv-hash.h            | 1 +
 gcc/rust/util/rust-dump.h           | 2 ++
 gcc/rust/util/rust-inline-visitor.h | 1 +
 gcc/rust/util/rust-unwrap-segment.h | 4 ++++
 5 files changed, 9 insertions(+)

diff --git a/gcc/rust/util/bi-map.h b/gcc/rust/util/bi-map.h
index 54870f7d971..4af157fd8dc 100644
--- a/gcc/rust/util/bi-map.h
+++ b/gcc/rust/util/bi-map.h
@@ -17,6 +17,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #include "rust-system.h"
+#include "optional.h"
 
 #ifndef BIMAP_H
 #define BIMAP_H
diff --git a/gcc/rust/util/fnv-hash.h b/gcc/rust/util/fnv-hash.h
index 6d2ec012faa..e51b66a95ae 100644
--- a/gcc/rust/util/fnv-hash.h
+++ b/gcc/rust/util/fnv-hash.h
@@ -15,6 +15,7 @@
 // You should have received a copy of the GNU General Public License
 // along with GCC; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
+#include "rust-system.h"
 
 #ifndef RUST_FNV_HASH_H
 #define RUST_FNV_HASH_H
diff --git a/gcc/rust/util/rust-dump.h b/gcc/rust/util/rust-dump.h
index c2d9c4d2d81..111174b866e 100644
--- a/gcc/rust/util/rust-dump.h
+++ b/gcc/rust/util/rust-dump.h
@@ -16,6 +16,8 @@
 // along with GCC; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
+#include "rust-system.h"
+
 // Common definitions useful for textual dump of IRs (AST and HIR).
 
 #ifndef RUST_DUMP_H
diff --git a/gcc/rust/util/rust-inline-visitor.h 
b/gcc/rust/util/rust-inline-visitor.h
index 2a35aa6cc14..a00cd2c0d94 100644
--- a/gcc/rust/util/rust-inline-visitor.h
+++ b/gcc/rust/util/rust-inline-visitor.h
@@ -15,6 +15,7 @@
 // You should have received a copy of the GNU General Public License
 // along with GCC; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
+#include "rust-system.h"
 
 // An improved implementation of the inline visitor.
 // Original idea from https://members.accu.org/index.php/articles/2021
diff --git a/gcc/rust/util/rust-unwrap-segment.h 
b/gcc/rust/util/rust-unwrap-segment.h
index af3a237ea28..7db038d7dfa 100644
--- a/gcc/rust/util/rust-unwrap-segment.h
+++ b/gcc/rust/util/rust-unwrap-segment.h
@@ -16,6 +16,10 @@
 // along with GCC; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
+#include "rust-system.h"
+#include "optional.h"
+#include "rust-lang-item.h"
+#include "rust-mapping-common.h"
 #include <ast/rust-ast-full-decls.h>
 
 namespace Rust {
-- 
2.50.1

Reply via email to