https://gcc.gnu.org/g:065486d81e24bf6fc80944c0980d99d8e35e6b91
commit r17-6259-g065486d81e24bf6fc80944c0980d99d8e35e6b91 Author: Pierre-Emmanuel Patry <[email protected]> Date: Fri Nov 6 19:57:18 2026 +0100 gccrs: Remove PathUtil class 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]> Diff: --- gcc/rust/ast/rust-ast.h | 1 - gcc/rust/resolve/rust-name-resolution-context.h | 1 - gcc/rust/util/rust-util-path.h | 45 ------------------------- 3 files changed, 47 deletions(-) diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 5000b3281248..05133d86bb4b 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 155c20711fa0..1564a83cbeb1 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 f597e0aba2be..000000000000 --- 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
