From: Pierre-Emmanuel Patry <[email protected]>
Since most Path classes are now inheriting from RawPath, we no longer
require the PathUtil class.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Remove header inclusion.
* resolve/rust-name-resolution-context.h: Likewise.
* util/rust-util-path.h: Removed.
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.
Commit on github:
https://github.com/Rust-GCC/gccrs/commit/b1bdba6d56ade2fe8819f657e8c165c336dc1f35
The commit has NOT been mentioned in any issue.
The commit has been mentioned in the following pull-request(s):
- https://github.com/Rust-GCC/gccrs/pull/5044
gcc/rust/ast/rust-ast.h | 1 -
.../resolve/rust-name-resolution-context.h | 1 -
gcc/rust/util/rust-util-path.h | 45 -------------------
3 files changed, 47 deletions(-)
delete mode 100644 gcc/rust/util/rust-util-path.h
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 5000b3281..05133d86b 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -28,7 +28,6 @@
#include "rust-keyword-values.h"
#include "rust-cloneable.h"
#include "rust-ast-identifier.h"
-#include "rust-util-path.h"
#include "rust-raw-path.h"
namespace Rust {
diff --git a/gcc/rust/resolve/rust-name-resolution-context.h
b/gcc/rust/resolve/rust-name-resolution-context.h
index 155c20711..1564a83cb 100644
--- a/gcc/rust/resolve/rust-name-resolution-context.h
+++ b/gcc/rust/resolve/rust-name-resolution-context.h
@@ -26,7 +26,6 @@
#include "rust-stacked-contexts.h"
#include "rust-item.h"
#include "rust-name-resolution.h"
-#include "rust-util-path.h"
namespace Rust {
namespace Resolver2_0 {
diff --git a/gcc/rust/util/rust-util-path.h b/gcc/rust/util/rust-util-path.h
deleted file mode 100644
index f597e0aba..000000000
--- a/gcc/rust/util/rust-util-path.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2026 Free Software Foundation, Inc.
-
-// This file is part of GCC.
-
-// GCC is free software; you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation; either version 3, or (at your option) any later
-// version.
-
-// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-// WARRANTY; without even the implied warranty of MERCHANTABILITY or
-// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-// for more details.
-
-// 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_UTIL_PATH_H
-#define RUST_UTIL_PATH_H
-
-namespace Rust {
-
-// Simple path container class to keep segments and opening scope flag together
-// whilst keeping the segment type generic.
-//
-// Only meant as a tuple for path elements with a name and a proper type.
-template <typename Segment> struct UtilPath
-{
- UtilPath (const std::vector<Segment> &segments, bool opening_scope)
- : segments (segments), opening_scope (opening_scope)
- {}
-
- const std::vector<Segment> &segments;
- bool opening_scope;
-
- bool has_opening_scope () const { return opening_scope; }
- const std::vector<Segment> &get_segments () const { return segments; }
-};
-
-} // namespace Rust
-
-#endif
--
2.56.0