Age | Commit message (Collapse) | Author | Files | Lines |
|
gcc/rust/ChangeLog:
* checks/errors/borrowck/ffi-polonius/Cargo.lock: Regenerate.
* checks/errors/borrowck/ffi-polonius/Cargo.toml: Update to use source patching instead of
vendoring, lower edition to 2018.
* checks/errors/borrowck/ffi-polonius/vendor/log/Cargo.toml: Change edition to 2018.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/lib.rs: Remove uses of unstable
feature.
* checks/errors/borrowck/ffi-polonius/.cargo/config.toml: Removed.
libgrust/ChangeLog:
* libformat_parser/Makefile.am: Avoid using --config as it is unsupported by cargo 1.49.
* libformat_parser/Makefile.in: Regenerate.
* libformat_parser/generic_format_parser/src/lib.rs: Use extension trait for missing
features.
* libformat_parser/src/lib.rs: Likewise.
* libformat_parser/.cargo/config: Moved to...
* libformat_parser/.cargo/config.toml: ...here.
|
|
gcc/rust/ChangeLog:
* ast/rust-fmt.h (enum ParseMode):
Drop typedef in Cpp
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs:
Remove repr(C)
* libformat_parser/src/bin.rs: Use ffi
* libformat_parser/src/lib.rs: pub ffi, create ParseMode and match
rustc's parse mode
|
|
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect):
Added options for ParseMode
* ast/rust-fmt.h (collect_pieces): Likewise.
(struct Pieces): Likewise.
* expand/rust-macro-builtins-format-args.cc (MacroBuiltin::format_args_handler):
Likewise.
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs: Likewise.
* libformat_parser/src/bin.rs: Likewise.
* libformat_parser/src/lib.rs: Likewise.
|
|
libgrust/ChangeLog:
* libformat_parser/Cargo.toml:
Used crate-type instead of depricated crate_type.
* libformat_parser/generic_format_parser/src/lib.rs:
Remove dead code.
* libformat_parser/src/lib.rs: Likewise.
Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
|
|
libgrust/ChangeLog:
* libformat_parser/Cargo.toml: Change Rust edition from 2021 to 2018.
* libformat_parser/generic_format_parser/Cargo.toml: Likewise.
* libformat_parser/generic_format_parser/src/lib.rs: Remove usage of
then-unstable std features and language constructs.
* libformat_parser/src/lib.rs: Likewise, plus provide extension trait
for String::leak.
|
|
`std::string::String` in the current scope'
Compiling with Debian GNU/Linux 12 (bookworm) packages:
$ apt-cache madison cargo rustc
cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main ppc64el Packages
cargo | 0.66.0+ds1-1 | http://deb.debian.org/debian bookworm/main Sources
rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main ppc64el Packages
rustc | 1.63.0+dfsg1-2 | http://deb.debian.org/debian bookworm/main Sources
..., we run into:
Compiling libformat_parser v0.1.0 ([...]/source-gcc/libgrust/libformat_parser)
error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
--> src/lib.rs:396:18
|
396 | ptr: str.leak().as_ptr(),
| ^^^^ method not found in `std::string::String`
error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
--> src/lib.rs:434:7
|
434 | s.leak();
| ^^^^ method not found in `std::string::String`
error[E0599]: no method named `leak` found for struct `std::string::String` in the current scope
--> src/lib.rs:439:23
|
439 | ptr: cloned_s.leak().as_ptr(),
| ^^^^ method not found in `std::string::String`
Locally replace 1.72.0+ method 'leak' for struct 'std::string::String'.
libgrust/
* libformat_parser/src/lib.rs: Work around 'error[E0599]:
no method named `leak` found for struct `std::string::String` in the current scope'.
|
|
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (ffi::RustHamster::to_string): New.
(Pieces::collect): Adapt to use new handle API.
(Pieces::~Pieces): Likewise.
(Pieces::Pieces): Likewise.
(Pieces::operator=): Likewise.
* ast/rust-fmt.h (struct RustString): Add members.
(struct FormatArgsHandle): New.
(clone_pieces): Adapt for new FFI API.
(destroy_pieces): Likewise.
(struct Pieces): Store new FormatArgsHandle type.
* expand/rust-expand-format-args.cc (expand_format_args): Use proper
namespace.
* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): FormatArgs
nodes are already resolved, so do nothing.
libgrust/ChangeLog:
* libformat_parser/src/lib.rs: Use new Handle struct and expose it.
|
|
gcc/rust/ChangeLog:
* ast/rust-ast.cc: Make FormatArgs inherit from AST::Expr
* ast/rust-builtin-ast-nodes.h: Improve FormatArg* nodes and helpers.
* ast/rust-fmt.cc (Pieces::collect): Fix interface to match FFI function.
* ast/rust-fmt.h (collect_pieces): Likewise.
(struct Pieces): Add append_newline parameter.
* expand/rust-macro-builtins.cc: Add proper parsing of format_args
input.
* hir/rust-ast-lower-base.cc: Include diagnostics header.
libgrust/ChangeLog:
* libformat_parser/src/lib.rs: Switch interface to use more parser
parameters.
* libformat_parser/src/bin.rs: Use new interface.
|
|
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs: Remove
unused deprecated attribute and unused import.
* libformat_parser/src/lib.rs: Remove unused import.
|
|
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.
|
|
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::~Pieces): Call libformat_parser's release
function in destructor.
* ast/rust-fmt.h (struct PieceSlice): Add capacity.
(destroy_pieces): New.
(struct Pieces): Add destructor.
libgrust/ChangeLog:
* libformat_parser/src/lib.rs: Leak Boxes properly for C++ to
see them, add memory release function.
|
|
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect): Use new Pieces API.
* ast/rust-fmt.h: Update interface with new FFI bindings.
libgrust/ChangeLog:
* libformat_parser/src/lib.rs: Add IntoFFI trait.
* libformat_parser/libformat-parser.h: Removed.
|
|
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs: Add generic
library.
* libformat_parser/src/lib.rs: Add base for FFI interface.
|
|
Compile libformat_parser and link to it.
gcc/rust/ChangeLog:
* Make-lang.in: Compile libformat_parser.
* ast/rust-fmt.cc: New FFI definitions.
* ast/rust-fmt.h: Likewise.
* expand/rust-macro-builtins.cc (MacroBuiltin::format_args_handler): Call
into libformat_parser.
* expand/rust-macro-builtins.h: Define format_args!() handler proper.
libgrust/ChangeLog:
* libformat_parser/Cargo.lock: New file.
* libformat_parser/Cargo.toml: New file.
* libformat_parser/generic_format_parser/Cargo.toml: New file.
* libformat_parser/generic_format_parser/src/lib.rs: New file.
* libformat_parser/src/bin.rs: New file.
* libformat_parser/src/lib.rs: New file.
|