gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / rust-exp.y
index 6e3e49259d09f8390d3a996c5da6bb5af49d4b2a..4e7878f67e1f93fe5cc4b02fe609d3eff008ee30 100644 (file)
@@ -2414,7 +2414,7 @@ rust_parser::convert_ast_to_expression (const struct rust_op *operation,
 
            if (!want_type
                && type->code () == TYPE_CODE_STRUCT
-               && TYPE_NFIELDS (type) == 0)
+               && type->num_fields () == 0)
              {
                /* A unit-like struct.  */
                write_exp_elt_opcode (pstate, OP_AGGREGATE);
@@ -2725,8 +2725,8 @@ rust_lex_tests (void)
 {
   int i;
 
-  // Set up dummy "parser", so that rust_type works.
-  struct parser_state ps (&rust_language_defn, target_gdbarch (),
+  /* Set up dummy "parser", so that rust_type works.  */
+  struct parser_state ps (language_def (language_rust), target_gdbarch (),
                          nullptr, 0, 0, nullptr, 0, nullptr);
   rust_parser parser (&ps);
 
This page took 0.024682 seconds and 4 git commands to generate.