[PowerPC] Fix indentation in arch/ppc-linux-common.c
[deliverable/binutils-gdb.git] / gdb / rust-lang.c
index b77738979f3fbc5bcec0a82a69da829d5129c010..152413a612f660d66b5cd54ed5731b714c62f170 100644 (file)
@@ -811,8 +811,6 @@ rust_internal_print_type (struct type *type, const char *varstring,
                          const struct type_print_options *flags,
                          bool for_rust_enum, print_offset_data *podata)
 {
-  int i;
-
   QUIT;
   if (show <= 0
       && TYPE_NAME (type) != NULL)
@@ -846,7 +844,7 @@ rust_internal_print_type (struct type *type, const char *varstring,
       if (varstring != NULL)
        fputs_filtered (varstring, stream);
       fputs_filtered ("(", stream);
-      for (i = 0; i < TYPE_NFIELDS (type); ++i)
+      for (int i = 0; i < TYPE_NFIELDS (type); ++i)
        {
          QUIT;
          if (i > 0)
@@ -891,7 +889,7 @@ rust_internal_print_type (struct type *type, const char *varstring,
 
     case TYPE_CODE_ENUM:
       {
-       int i, len = 0;
+       int len = 0;
 
        fputs_filtered ("enum ", stream);
        if (TYPE_NAME (type) != NULL)
@@ -902,7 +900,7 @@ rust_internal_print_type (struct type *type, const char *varstring,
          }
        fputs_filtered ("{\n", stream);
 
-       for (i = 0; i < TYPE_NFIELDS (type); ++i)
+       for (int i = 0; i < TYPE_NFIELDS (type); ++i)
          {
            const char *name = TYPE_FIELD_NAME (type, i);
 
@@ -1726,9 +1724,9 @@ tuple structs, and tuple-like enum variants"));
            struct type *outer_type = type;
            type = value_type (lhs);
            if (rust_tuple_type_p (type) || rust_tuple_struct_type_p (type))
-               error (_("Attempting to access named field foo of tuple "
+               error (_("Attempting to access named field %s of tuple "
                         "variant %s::%s, which has only anonymous fields"),
-                      TYPE_NAME (outer_type),
+                      field_name, TYPE_NAME (outer_type),
                       rust_last_path_segment (TYPE_NAME (type)));
 
            TRY
This page took 0.023731 seconds and 4 git commands to generate.