mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 00:59:15 +08:00
Remove some dead code from the Rust value printer
This removes a bit of dead code from the Rust value printer. This code wasn't always dead -- it fixed a real bug, and a test case was added for it. However, once val_print was removed, it became unnecessary.
This commit is contained in:
@ -324,14 +324,6 @@ rust_language::val_print_struct
|
|||||||
|
|
||||||
if (rust_slice_type_p (type) && strcmp (type->name (), "&str") == 0)
|
if (rust_slice_type_p (type) && strcmp (type->name (), "&str") == 0)
|
||||||
{
|
{
|
||||||
/* If what we are printing here is actually a string within a
|
|
||||||
structure then VAL will be the original parent value, while TYPE
|
|
||||||
will be the type of the structure representing the string we want
|
|
||||||
to print.
|
|
||||||
However, RUST_VAL_PRINT_STR looks up the fields of the string
|
|
||||||
inside VAL, assuming that VAL is the string.
|
|
||||||
So, recreate VAL as a value representing just the string. */
|
|
||||||
val = value_at_lazy (type, value_address (val));
|
|
||||||
rust_val_print_str (stream, val, options);
|
rust_val_print_str (stream, val, options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user