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:
parent
7410508723
commit
925ea601f1
1 changed files with 0 additions and 8 deletions
|
@ -324,14 +324,6 @@ rust_language::val_print_struct
|
|||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue