aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-fmt.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-fmt.cc')
-rw-r--r--gcc/rust/ast/rust-fmt.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-fmt.cc b/gcc/rust/ast/rust-fmt.cc
index a7c4341..f6ee8a2 100644
--- a/gcc/rust/ast/rust-fmt.cc
+++ b/gcc/rust/ast/rust-fmt.cc
@@ -34,8 +34,10 @@ Pieces::collect (const std::string &to_parse)
// auto pieces = std::vector<Piece> (piece_slice.base_ptr,
// piece_slice.base_ptr + piece_slice.len);
- return Pieces{};
+ return Pieces (piece_slice);
}
+Pieces::~Pieces () { destroy_pieces (slice); }
+
} // namespace Fmt
} // namespace Rust