{
translated_segment = nullptr;
seg->accept_vis (*this);
- if (translated_segment == nullptr)
- {
- rust_fatal_error (seg->get_locus (),
- "failed to translate AST TypePathSegment");
- }
+ rust_assert (translated_segment != nullptr);
+
translated_segments.push_back (
std::unique_ptr<HIR::TypePathSegment> (translated_segment));
}
translated_segment = nullptr;
path.get_associated_segment ()->accept_vis (*this);
- if (translated_segment == nullptr)
- {
- rust_fatal_error (path.get_associated_segment ()->get_locus (),
- "failed to translate AST TypePathSegment");
- return;
- }
+ rust_assert (translated_segment != nullptr);
+
std::unique_ptr<HIR::TypePathSegment> associated_segment (translated_segment);
std::vector<std::unique_ptr<HIR::TypePathSegment>> translated_segments;
{
translated_segment = nullptr;
seg->accept_vis (*this);
- if (translated_segment == nullptr)
- {
- rust_fatal_error (seg->get_locus (),
- "failed to translte AST TypePathSegment");
- }
+ rust_assert (translated_segment != nullptr);
+
translated_segments.push_back (
std::unique_ptr<HIR::TypePathSegment> (translated_segment));
}
-/* rust-backend.c -- Rust frontend interface to gcc backend.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2024 Free Software Foundation, Inc.
This file is part of GCC.