aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Dupak <dev@jakubdupak.com>2024-03-22 16:24:30 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2024-04-04 16:21:10 +0000
commite06d74b8bff0aa91227976c615d942be23912943 (patch)
tree23c9591ff2c6c83e850596648dc3d80188d55621 /gcc
parentfbf35de5dcf89706452513b2ce2926fe95b38daa (diff)
downloadgcc-e06d74b8bff0aa91227976c615d942be23912943.zip
gcc-e06d74b8bff0aa91227976c615d942be23912943.tar.gz
gcc-e06d74b8bff0aa91227976c615d942be23912943.tar.bz2
borrowck: Use rust-system.h
Replace direct usage of system headers. gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-dump.cc: Use rust-system.h * checks/errors/borrowck/rust-bir-dump.h (RUST_BIR_DUMP_H): Use rust-system.h * checks/errors/borrowck/rust-bir-place.h (RUST_BIR_PLACE_H): Use rust-system.h * checks/errors/borrowck/rust-function-collector.h: Use rust-system.h * rust-system.h: Use rust-system.h * typecheck/rust-hir-type-check.h: Use rust-system.h * typecheck/rust-tyty-subst.cc: Use rust-system.h * typecheck/rust-tyty-subst.h: Use rust-system.h * typecheck/rust-tyty.h: Use rust-system.h Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-dump.cc2
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-dump.h3
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-place.h1
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-function-collector.h3
-rw-r--r--gcc/rust/rust-system.h3
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check.h3
-rw-r--r--gcc/rust/typecheck/rust-tyty-subst.cc2
-rw-r--r--gcc/rust/typecheck/rust-tyty-subst.h3
-rw-r--r--gcc/rust/typecheck/rust-tyty.h3
9 files changed, 10 insertions, 13 deletions
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc b/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
index 23aa7c6..3e49bc7 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
@@ -1,4 +1,4 @@
-#include <numeric>
+#include "rust-system.h"
#include "rust-bir-dump.h"
#include "rust-diagnostics.h"
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-dump.h b/gcc/rust/checks/errors/borrowck/rust-bir-dump.h
index e8cf137..b6407a8 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-dump.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-dump.h
@@ -19,8 +19,7 @@
#ifndef RUST_BIR_DUMP_H
#define RUST_BIR_DUMP_H
-#include <ostream>
-#include <utility>
+#include "rust-system.h"
#include "rust-bir-place.h"
#include "rust-bir-visitor.h"
#include "rust-bir.h"
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-place.h b/gcc/rust/checks/errors/borrowck/rust-bir-place.h
index 7b04ae4..ccc8201 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-place.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-place.h
@@ -19,7 +19,6 @@
#ifndef RUST_BIR_PLACE_H
#define RUST_BIR_PLACE_H
-#include <limits>
#include "rust-mapping-common.h"
#include "rust-system.h"
#include "rust-tyty.h"
diff --git a/gcc/rust/checks/errors/borrowck/rust-function-collector.h b/gcc/rust/checks/errors/borrowck/rust-function-collector.h
index 18f2f5e..272f20d 100644
--- a/gcc/rust/checks/errors/borrowck/rust-function-collector.h
+++ b/gcc/rust/checks/errors/borrowck/rust-function-collector.h
@@ -22,8 +22,7 @@
#include "rust-hir-item.h"
#include "rust-hir-visitor.h"
#include "rust-hir.h"
-
-#include <vector>
+#include "rust-system.h"
namespace Rust {
diff --git a/gcc/rust/rust-system.h b/gcc/rust/rust-system.h
index d8a4218..2382e5b 100644
--- a/gcc/rust/rust-system.h
+++ b/gcc/rust/rust-system.h
@@ -36,6 +36,7 @@
#include <map>
#include <set>
#include <vector>
+#include <stack>
#include <sstream>
#include <string>
#include <deque>
@@ -45,6 +46,8 @@
#include <fstream>
#include <array>
#include <algorithm>
+#include <limits>
+#include <numeric>
// Rust frontend requires C++11 minimum, so will have unordered_map and set
#include <unordered_map>
diff --git a/gcc/rust/typecheck/rust-hir-type-check.h b/gcc/rust/typecheck/rust-hir-type-check.h
index c32fa4e..c85a839 100644
--- a/gcc/rust/typecheck/rust-hir-type-check.h
+++ b/gcc/rust/typecheck/rust-hir-type-check.h
@@ -25,8 +25,7 @@
#include "rust-autoderef.h"
#include "rust-tyty-region.h"
#include "rust-tyty-variance-analysis.h"
-
-#include <stack>
+#include "rust-system.h"
namespace Rust {
namespace Resolver {
diff --git a/gcc/rust/typecheck/rust-tyty-subst.cc b/gcc/rust/typecheck/rust-tyty-subst.cc
index 71d41d6..8c80155 100644
--- a/gcc/rust/typecheck/rust-tyty-subst.cc
+++ b/gcc/rust/typecheck/rust-tyty-subst.cc
@@ -18,7 +18,7 @@
#include "rust-tyty-subst.h"
-#include <utility>
+#include "rust-system.h"
#include "rust-tyty.h"
#include "rust-hir-type-check.h"
#include "rust-substitution-mapper.h"
diff --git a/gcc/rust/typecheck/rust-tyty-subst.h b/gcc/rust/typecheck/rust-tyty-subst.h
index 562267c..4f0fab3 100644
--- a/gcc/rust/typecheck/rust-tyty-subst.h
+++ b/gcc/rust/typecheck/rust-tyty-subst.h
@@ -24,8 +24,7 @@
#include "rust-hir-full-decls.h"
#include "rust-tyty-bounds.h"
#include "rust-tyty-region.h"
-
-#include <optional.h>
+#include "optional.h"
namespace Rust {
namespace TyTy {
diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h
index 5d4eab4..27a4aa2 100644
--- a/gcc/rust/typecheck/rust-tyty.h
+++ b/gcc/rust/typecheck/rust-tyty.h
@@ -27,8 +27,7 @@
#include "rust-tyty-util.h"
#include "rust-tyty-subst.h"
#include "rust-tyty-region.h"
-
-#include <limits>
+#include "rust-system.h"
namespace Rust {