Make it simpler to add events to Python
[deliverable/binutils-gdb.git] / gdb / rust-lang.c
index dce184ced0ebb2ed052c2f5616d0a5800901e27b..c5764bf8d124d2bf0175a92eaca939b6103a4cde 100644 (file)
@@ -35,8 +35,6 @@
 #include <string>
 #include <vector>
 
-extern initialize_file_ftype _initialize_rust_language;
-
 /* Returns the last segment of a Rust path like foo::bar::baz.  Will
    not handle cases where the last segment contains generics.  This
    will return NULL if the last segment cannot be found.  */
@@ -893,13 +891,12 @@ rust_print_type (struct type *type, const char *varstring,
        fputs_filtered ("[", stream);
        rust_print_type (TYPE_TARGET_TYPE (type), NULL,
                         stream, show - 1, level, flags);
-       fputs_filtered ("; ", stream);
 
        if (TYPE_HIGH_BOUND_KIND (TYPE_INDEX_TYPE (type)) == PROP_LOCEXPR
            || TYPE_HIGH_BOUND_KIND (TYPE_INDEX_TYPE (type)) == PROP_LOCLIST)
-         fprintf_filtered (stream, "variable length");
+         fprintf_filtered (stream, "variable length");
        else if (get_array_bounds (type, &low_bound, &high_bound))
-         fprintf_filtered (stream, "%s", 
+         fprintf_filtered (stream, "; %s",
                            plongest (high_bound - low_bound + 1));
        fputs_filtered ("]", stream);
       }
@@ -1293,7 +1290,7 @@ rust_evaluate_funcall (struct expression *exp, int *pos, enum noside noside)
   if (noside == EVAL_AVOID_SIDE_EFFECTS)
     result = value_zero (TYPE_TARGET_TYPE (fn_type), not_lval);
   else
-    result = call_function_by_hand (function, num_args + 1, args.data ());
+    result = call_function_by_hand (function, NULL, num_args + 1, args.data ());
   return result;
 }
 
@@ -2151,7 +2148,7 @@ static const char *rust_extensions[] =
   ".rs", NULL
 };
 
-static const struct language_defn rust_language_defn =
+extern const struct language_defn rust_language_defn =
 {
   "rust",
   "Rust",
@@ -2185,7 +2182,7 @@ static const struct language_defn rust_language_defn =
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   default_word_break_characters,
-  default_make_symbol_completion_list,
+  default_collect_symbol_completion_matches,
   rust_language_arch_info,
   default_print_array_index,
   default_pass_by_reference,
@@ -2198,9 +2195,3 @@ static const struct language_defn rust_language_defn =
   NULL,
   LANG_MAGIC
 };
-
-void
-_initialize_rust_language (void)
-{
-  add_language (&rust_language_defn);
-}
This page took 0.037305 seconds and 4 git commands to generate.