diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2024-12-04 15:23:07 -0500 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2025-01-03 11:16:48 +0000 |
commit | de8606fc7272c75e71976730b9a9c08ef52a7d36 (patch) | |
tree | 4d717cd1c851abca74a8eff9a9eff3de47ff013d /gcc/rust/util/rust-make-unique.h | |
parent | daf98a1495d274dd12eba238229741c80899bdcc (diff) | |
download | gcc-de8606fc7272c75e71976730b9a9c08ef52a7d36.zip gcc-de8606fc7272c75e71976730b9a9c08ef52a7d36.tar.gz gcc-de8606fc7272c75e71976730b9a9c08ef52a7d36.tar.bz2 |
Remove Rust::make_unique
Since our bootstrap requirement has been bumped to C++14, we don't need
a custom implementation of std::make_unique anymore.
gcc/rust/ChangeLog:
* ast/rust-ast-builder-type.cc: Remove inclusion of
rust-make-unique.h.
* ast/rust-ast-builder.cc: Likewise.
(Builder::array): Use std::make_unique instead of
Rust::make_unique.
* ast/rust-ast.cc (Attribute::get_traits_to_derive): Likewise.
* ast/rust-macro.h: Remove inclusion of rust-make-unique.h.
(MacroRulesDefinition::mbe): Use std::make_unique instead of
Rust::make_unique.
(MacroRulesDefinition::decl_macro): Likewise.
* ast/rust-path.h
(PathInExpression::PathInExpression): Likewise.
(QualifiedPathInExpression::QualifiedPathInExpression):
Likewise.
* backend/rust-compile-pattern.cc
(CompilePatternCheckExpr::visit): Likewise.
* expand/rust-derive-copy.cc
(DeriveCopy::copy_impl): Likewise.
* expand/rust-expand-format-args.cc
(expand_format_args): Likewise.
* expand/rust-macro-builtins-asm.cc: Remove inclusion of
rust-make-unique.h.
(parse_asm): Use std::make_unique instead of Rust::make_unique.
* hir/rust-ast-lower-expr.cc
(ASTLoweringExpr::visit): Likewise.
* hir/tree/rust-hir-expr.cc
(StructExprStructFields::StructExprStructFields): Likewise.
(StructExprStructFields::operator=): Likewise.
* hir/tree/rust-hir.cc
(TypePath::to_trait_bound): Likewise.
* lex/rust-token.h: Remove inclusion of rust-make-unique.h.
(Token::Token): Use std::make_unique instead of
Rust::make_unique.
* metadata/rust-import-archive.cc: Remove inclusion of
rust-make-unique.h.
(Import::find_archive_export_data): Use std::make_unique instead
of Rust::make_unique.
* metadata/rust-imports.cc: Remove inclusion of
rust-make-unique.h.
(Import::find_export_data): Use std::make_unique instead of
Rust::make_unique.
(Import::find_object_export_data): Likewise.
* parse/rust-parse-impl.h: Remove inclusion of
rust-make-unique.h.
(Parser::parse_function_param): Use std::make_unique instead of
Rust::make_unique.
(Parser::parse_self_param): Likewise.
(Parser::parse_array_expr): Likewise.
* typecheck/rust-hir-type-check-enumitem.cc
(TypeCheckEnumItem::visit): Likewise.
* typecheck/rust-hir-type-check-implitem.cc
(TypeCheckTopLevelExternItem::visit): Likewise.
(TypeCheckImplItem::visit): Likewise.
* typecheck/rust-hir-type-check-type.cc
(TypeResolveGenericParam::visit): Likewise.
* typecheck/rust-hir-type-check.cc: Remove inclusion of
rust-make-unique.h.
(TraitItemReference::get_type_from_fn): Use std::make_unique
instead of Rust::make_unique.
* typecheck/rust-tyty-bounds.cc
(TypeCheckBase::get_predicate_from_bound): Likewise.
* util/rust-make-unique.h: Removed.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/util/rust-make-unique.h')
-rw-r--r-- | gcc/rust/util/rust-make-unique.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/gcc/rust/util/rust-make-unique.h b/gcc/rust/util/rust-make-unique.h deleted file mode 100644 index 09c1d4b..0000000 --- a/gcc/rust/util/rust-make-unique.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2020-2024 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/>. - -#ifndef RUST_MAKE_UNIQUE_H -#define RUST_MAKE_UNIQUE_H - -#include "rust-system.h" - -namespace Rust { - -template <typename T, typename... Ts> -std::unique_ptr<T> -make_unique (Ts &&... params) -{ - return std::unique_ptr<T> (new T (std::forward<Ts> (params)...)); -} - -} // namespace Rust - -#endif // RUST_MAKE_UNIQUE_H |