aboutsummaryrefslogtreecommitdiff
path: root/libgrust
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-02-13 16:31:25 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-08-01 13:11:29 +0200
commit0f9668507c9843a773af794ed8d0b0de3fa8b5cf (patch)
tree9baf7f99f190a6ead727f097aa2b7e204341b3dd /libgrust
parent827231aac4d0532dd74863f72c11462cecd02abb (diff)
downloadgcc-0f9668507c9843a773af794ed8d0b0de3fa8b5cf.zip
gcc-0f9668507c9843a773af794ed8d0b0de3fa8b5cf.tar.gz
gcc-0f9668507c9843a773af794ed8d0b0de3fa8b5cf.tar.bz2
gccrs: rust-fmt: Store parsed string in Pieces struct
gcc/rust/ChangeLog: * ast/rust-fmt.cc (Pieces::collect): Fix signature to take ownership of the given string. * ast/rust-fmt.h (struct Pieces): Store parsed string in the struct. libgrust/ChangeLog: * libformat_parser/src/lib.rs: Add debug prompt.
Diffstat (limited to 'libgrust')
-rw-r--r--libgrust/libformat_parser/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgrust/libformat_parser/src/lib.rs b/libgrust/libformat_parser/src/lib.rs
index 9b2bffe..eb3e106 100644
--- a/libgrust/libformat_parser/src/lib.rs
+++ b/libgrust/libformat_parser/src/lib.rs
@@ -340,6 +340,7 @@ pub struct PieceSlice {
pub extern "C" fn collect_pieces(input: *const libc::c_char) -> PieceSlice {
// FIXME: Add comment
let str = unsafe { CStr::from_ptr(input) };
+ dbg!(str);
// FIXME: No unwrap
let pieces: Vec<ffi::Piece<'_>> = rust::collect_pieces(str.to_str().unwrap())