[gcc/devel/rust/master] gccrs: Cleanup unused headers

Thomas Schwinge tschwinge@gcc.gnu.org
Tue Mar 21 08:35:13 GMT 2023


https://gcc.gnu.org/g:a505e2913b41b2b415b9808a17d3a5a746d89f10

commit a505e2913b41b2b415b9808a17d3a5a746d89f10
Author: Philip Herron <herron.philip@googlemail.com>
Date:   Mon Mar 20 14:39:44 2023 +0000

    gccrs: Cleanup unused headers
    
    gcc/rust/ChangeLog:
    
            * hir/rust-ast-lower-implitem.h (RUST_AST_LOWER_IMPLITEM_H): cleanup header usage
            * hir/rust-ast-lower-item.cc: likewise
            * hir/rust-ast-lower-item.h (RUST_AST_LOWER_ITEM): likewise
            * hir/rust-ast-lower-stmt.cc: likewise
            * hir/rust-ast-lower-stmt.h (RUST_AST_LOWER_STMT): likewise
            * hir/rust-ast-lower-type.h: likewise
            * hir/rust-ast-lower.cc: likewise
            * hir/rust-ast-lower.h: likewise
            * resolve/rust-ast-resolve-expr.h: likewise
            * resolve/rust-ast-resolve-item.cc: likewise
            * resolve/rust-ast-resolve-item.h: likewise
            * resolve/rust-ast-resolve-stmt.cc: likewise
            * resolve/rust-ast-resolve-stmt.h: likewise
            * resolve/rust-ast-resolve-struct-expr-field.h: likewise
            * resolve/rust-ast-resolve-toplevel.h: likewise
            * resolve/rust-ast-resolve-type.h: likewise
            * resolve/rust-ast-resolve.h: likewise
    
    Signed-off-by: Philip Herron <herron.philip@googlemail.com>

Diff:
---
 gcc/rust/hir/rust-ast-lower-implitem.h                |  2 --
 gcc/rust/hir/rust-ast-lower-item.cc                   |  9 +++++++++
 gcc/rust/hir/rust-ast-lower-item.h                    | 12 ------------
 gcc/rust/hir/rust-ast-lower-stmt.cc                   |  5 +++++
 gcc/rust/hir/rust-ast-lower-stmt.h                    |  7 -------
 gcc/rust/hir/rust-ast-lower-type.h                    |  1 -
 gcc/rust/hir/rust-ast-lower.cc                        |  2 +-
 gcc/rust/hir/rust-ast-lower.h                         |  5 ++---
 gcc/rust/resolve/rust-ast-resolve-expr.h              |  1 -
 gcc/rust/resolve/rust-ast-resolve-item.cc             |  4 ++++
 gcc/rust/resolve/rust-ast-resolve-item.h              |  6 +-----
 gcc/rust/resolve/rust-ast-resolve-stmt.cc             |  1 +
 gcc/rust/resolve/rust-ast-resolve-stmt.h              |  1 -
 gcc/rust/resolve/rust-ast-resolve-struct-expr-field.h |  1 -
 gcc/rust/resolve/rust-ast-resolve-toplevel.h          |  3 ---
 gcc/rust/resolve/rust-ast-resolve-type.h              |  1 -
 gcc/rust/resolve/rust-ast-resolve.h                   |  1 -
 17 files changed, 23 insertions(+), 39 deletions(-)

diff --git a/gcc/rust/hir/rust-ast-lower-implitem.h b/gcc/rust/hir/rust-ast-lower-implitem.h
index 709bb573046..2990e3efe73 100644
--- a/gcc/rust/hir/rust-ast-lower-implitem.h
+++ b/gcc/rust/hir/rust-ast-lower-implitem.h
@@ -19,9 +19,7 @@
 #ifndef RUST_AST_LOWER_IMPLITEM_H
 #define RUST_AST_LOWER_IMPLITEM_H
 
-#include "rust-diagnostics.h"
 #include "rust-ast-lower-type.h"
-#include "rust-ast-lower-stmt.h"
 #include "rust-ast-lower-expr.h"
 #include "rust-ast-lower-pattern.h"
 #include "rust-ast-lower-block.h"
diff --git a/gcc/rust/hir/rust-ast-lower-item.cc b/gcc/rust/hir/rust-ast-lower-item.cc
index 8c265e7f31c..0ad4a84a2c1 100644
--- a/gcc/rust/hir/rust-ast-lower-item.cc
+++ b/gcc/rust/hir/rust-ast-lower-item.cc
@@ -17,6 +17,15 @@
 // <http://www.gnu.org/licenses/>.
 
 #include "rust-ast-lower-item.h"
+#include "rust-diagnostics.h"
+#include "rust-ast-lower.h"
+#include "rust-ast-lower-base.h"
+#include "rust-ast-lower-enumitem.h"
+#include "rust-ast-lower-type.h"
+#include "rust-ast-lower-implitem.h"
+#include "rust-ast-lower-expr.h"
+#include "rust-ast-lower-pattern.h"
+#include "rust-ast-lower-block.h"
 
 namespace Rust {
 namespace HIR {
diff --git a/gcc/rust/hir/rust-ast-lower-item.h b/gcc/rust/hir/rust-ast-lower-item.h
index f059c0568a7..15619c003f8 100644
--- a/gcc/rust/hir/rust-ast-lower-item.h
+++ b/gcc/rust/hir/rust-ast-lower-item.h
@@ -19,19 +19,7 @@
 #ifndef RUST_AST_LOWER_ITEM
 #define RUST_AST_LOWER_ITEM
 
-#include "rust-diagnostics.h"
-
-#include "rust-ast-lower.h"
 #include "rust-ast-lower-base.h"
-#include "rust-ast-lower-enumitem.h"
-#include "rust-ast-lower-type.h"
-#include "rust-ast-lower-implitem.h"
-#include "rust-ast-lower-stmt.h"
-#include "rust-ast-lower-expr.h"
-#include "rust-ast-lower-pattern.h"
-#include "rust-ast-lower-block.h"
-#include "rust-ast-lower-extern.h"
-#include "rust-hir-full-decls.h"
 
 namespace Rust {
 namespace HIR {
diff --git a/gcc/rust/hir/rust-ast-lower-stmt.cc b/gcc/rust/hir/rust-ast-lower-stmt.cc
index 3d94259ac5a..dbff8ad715f 100644
--- a/gcc/rust/hir/rust-ast-lower-stmt.cc
+++ b/gcc/rust/hir/rust-ast-lower-stmt.cc
@@ -17,6 +17,11 @@
 // <http://www.gnu.org/licenses/>.
 
 #include "rust-ast-lower-stmt.h"
+#include "rust-ast-lower-enumitem.h"
+#include "rust-ast-lower-type.h"
+#include "rust-ast-lower-block.h"
+#include "rust-ast-lower-expr.h"
+#include "rust-ast-lower-pattern.h"
 
 namespace Rust {
 namespace HIR {
diff --git a/gcc/rust/hir/rust-ast-lower-stmt.h b/gcc/rust/hir/rust-ast-lower-stmt.h
index de4725be177..8365b32b822 100644
--- a/gcc/rust/hir/rust-ast-lower-stmt.h
+++ b/gcc/rust/hir/rust-ast-lower-stmt.h
@@ -19,14 +19,7 @@
 #ifndef RUST_AST_LOWER_STMT
 #define RUST_AST_LOWER_STMT
 
-#include "rust-diagnostics.h"
-
 #include "rust-ast-lower-base.h"
-#include "rust-ast-lower-enumitem.h"
-#include "rust-ast-lower-type.h"
-#include "rust-ast-lower-block.h"
-#include "rust-ast-lower-expr.h"
-#include "rust-ast-lower-pattern.h"
 
 namespace Rust {
 namespace HIR {
diff --git a/gcc/rust/hir/rust-ast-lower-type.h b/gcc/rust/hir/rust-ast-lower-type.h
index a0761023ce8..7432ed80d60 100644
--- a/gcc/rust/hir/rust-ast-lower-type.h
+++ b/gcc/rust/hir/rust-ast-lower-type.h
@@ -20,7 +20,6 @@
 #define RUST_AST_LOWER_TYPE
 
 #include "rust-ast-lower-base.h"
-#include "rust-diagnostics.h"
 #include "rust-ast-lower-expr.h"
 
 namespace Rust {
diff --git a/gcc/rust/hir/rust-ast-lower.cc b/gcc/rust/hir/rust-ast-lower.cc
index 36dd1a9d8e6..c2fd54dae9b 100644
--- a/gcc/rust/hir/rust-ast-lower.cc
+++ b/gcc/rust/hir/rust-ast-lower.cc
@@ -18,7 +18,7 @@
 
 #include "rust-ast-lower.h"
 #include "rust-ast-lower-item.h"
-#include "rust-ast-lower-implitem.h"
+#include "rust-ast-lower-stmt.h"
 #include "rust-ast-lower-expr.h"
 #include "rust-ast-lower-block.h"
 #include "rust-ast-lower-type.h"
diff --git a/gcc/rust/hir/rust-ast-lower.h b/gcc/rust/hir/rust-ast-lower.h
index e52b9b899b6..c56d449e0d4 100644
--- a/gcc/rust/hir/rust-ast-lower.h
+++ b/gcc/rust/hir/rust-ast-lower.h
@@ -20,9 +20,8 @@
 #define RUST_HIR_LOWER
 
 #include "rust-system.h"
-#include "rust-ast-full.h"
-#include "rust-ast-visitor.h"
-#include "rust-hir-full.h"
+#include "rust-ast-full-decls.h"
+#include "rust-hir-full-decls.h"
 
 namespace Rust {
 namespace HIR {
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.h b/gcc/rust/resolve/rust-ast-resolve-expr.h
index 07b029fabb3..9863588ef32 100644
--- a/gcc/rust/resolve/rust-ast-resolve-expr.h
+++ b/gcc/rust/resolve/rust-ast-resolve-expr.h
@@ -21,7 +21,6 @@
 
 #include "rust-ast-resolve-base.h"
 #include "rust-ast-resolve-pattern.h"
-#include "rust-ast-full.h"
 
 namespace Rust {
 namespace Resolver {
diff --git a/gcc/rust/resolve/rust-ast-resolve-item.cc b/gcc/rust/resolve/rust-ast-resolve-item.cc
index 958ae49c810..385d4b0566a 100644
--- a/gcc/rust/resolve/rust-ast-resolve-item.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-item.cc
@@ -17,7 +17,11 @@
 // <http://www.gnu.org/licenses/>.
 
 #include "rust-ast-resolve-item.h"
+#include "rust-ast-resolve-toplevel.h"
+#include "rust-ast-resolve-type.h"
+#include "rust-ast-resolve-pattern.h"
 #include "rust-ast-resolve-path.h"
+
 #include "selftest.h"
 
 namespace Rust {
diff --git a/gcc/rust/resolve/rust-ast-resolve-item.h b/gcc/rust/resolve/rust-ast-resolve-item.h
index d17c9561fb7..db47df5713a 100644
--- a/gcc/rust/resolve/rust-ast-resolve-item.h
+++ b/gcc/rust/resolve/rust-ast-resolve-item.h
@@ -21,11 +21,7 @@
 
 #include "rust-ast-full-decls.h"
 #include "rust-ast-resolve-base.h"
-#include "rust-ast-full.h"
-#include "rust-ast-resolve-toplevel.h"
-#include "rust-ast-resolve-type.h"
-#include "rust-ast-resolve-pattern.h"
-#include "rust-ast-resolve-stmt.h"
+
 #include "config.h"
 
 namespace Rust {
diff --git a/gcc/rust/resolve/rust-ast-resolve-stmt.cc b/gcc/rust/resolve/rust-ast-resolve-stmt.cc
index 00e37c2c518..2cbf6e0e579 100644
--- a/gcc/rust/resolve/rust-ast-resolve-stmt.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-stmt.cc
@@ -18,6 +18,7 @@
 
 #include "rust-ast-resolve-item.h"
 #include "rust-ast-resolve-stmt.h"
+#include "rust-ast-resolve-implitem.h"
 
 namespace Rust {
 namespace Resolver {
diff --git a/gcc/rust/resolve/rust-ast-resolve-stmt.h b/gcc/rust/resolve/rust-ast-resolve-stmt.h
index 1336402d43e..39864c3ba4d 100644
--- a/gcc/rust/resolve/rust-ast-resolve-stmt.h
+++ b/gcc/rust/resolve/rust-ast-resolve-stmt.h
@@ -20,7 +20,6 @@
 #define RUST_AST_RESOLVE_STMT_H
 
 #include "rust-ast-resolve-base.h"
-#include "rust-ast-full.h"
 #include "rust-ast-resolve-type.h"
 #include "rust-ast-resolve-pattern.h"
 #include "rust-ast-resolve-expr.h"
diff --git a/gcc/rust/resolve/rust-ast-resolve-struct-expr-field.h b/gcc/rust/resolve/rust-ast-resolve-struct-expr-field.h
index a0e7d19def5..6a11e2474d2 100644
--- a/gcc/rust/resolve/rust-ast-resolve-struct-expr-field.h
+++ b/gcc/rust/resolve/rust-ast-resolve-struct-expr-field.h
@@ -20,7 +20,6 @@
 #define RUST_AST_RESOLVE_STRUCT_EXPR_FIELD
 
 #include "rust-ast-resolve-base.h"
-#include "rust-ast-full.h"
 
 namespace Rust {
 namespace Resolver {
diff --git a/gcc/rust/resolve/rust-ast-resolve-toplevel.h b/gcc/rust/resolve/rust-ast-resolve-toplevel.h
index d751318ee54..c705ea860cd 100644
--- a/gcc/rust/resolve/rust-ast-resolve-toplevel.h
+++ b/gcc/rust/resolve/rust-ast-resolve-toplevel.h
@@ -20,11 +20,8 @@
 #define RUST_AST_RESOLVE_TOPLEVEL_H
 
 #include "rust-ast-resolve-base.h"
-#include "rust-ast-resolve-type.h"
 #include "rust-ast-resolve-implitem.h"
-#include "rust-ast-full.h"
 #include "rust-name-resolver.h"
-#include "rust-session-manager.h"
 
 namespace Rust {
 namespace Resolver {
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.h b/gcc/rust/resolve/rust-ast-resolve-type.h
index bb1178362fb..f98ed8fee3a 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.h
+++ b/gcc/rust/resolve/rust-ast-resolve-type.h
@@ -21,7 +21,6 @@
 
 #include "rust-ast-resolve-base.h"
 #include "rust-ast-resolve-expr.h"
-#include "rust-ast-full.h"
 
 namespace Rust {
 namespace Resolver {
diff --git a/gcc/rust/resolve/rust-ast-resolve.h b/gcc/rust/resolve/rust-ast-resolve.h
index 85fe50657b3..b1237234f16 100644
--- a/gcc/rust/resolve/rust-ast-resolve.h
+++ b/gcc/rust/resolve/rust-ast-resolve.h
@@ -20,7 +20,6 @@
 #define RUST_AST_RESOLVE_H
 
 #include "rust-name-resolver.h"
-#include "rust-ast-full.h"
 #include "rust-hir-map.h"
 
 namespace Rust {


More information about the Gcc-cvs mailing list