Add `set print array-indexes' tests for C/C++ arrays
[binutils-gdb.git] / gdb / rust-lang.h
index 6962f45d7b88c56ad40d0c3f01b4226e78ffddc0..60a1967ff451c7af2c1e37d70347c25425b0a4f7 100644 (file)
@@ -1,6 +1,6 @@
 /* Rust language support definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2016-2021 Free Software Foundation, Inc.
+   Copyright (C) 2016-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -113,9 +113,8 @@ public:
   {
     type = check_typedef (TYPE_TARGET_TYPE (check_typedef (type)));
     std::string name = type_to_string (type);
-    return gdb::unique_xmalloc_ptr<char>
-      (xstrprintf ("*(%s as *mut %s)", core_addr_to_string (addr),
-                  name.c_str ()));
+    return xstrprintf ("*(%s as *mut %s)", core_addr_to_string (addr),
+                      name.c_str ());
   }
 
   /* See language.h.  */