(* Generated by coq-of-rust *)
Require Import CoqOfRust.CoqOfRust.

Module ffi.
  Axiom c_char : (Ty.path "core::ffi::c_char") = (Ty.path "i8").
  
  Axiom c_schar : (Ty.path "core::ffi::c_schar") = (Ty.path "i8").
  
  Axiom c_uchar : (Ty.path "core::ffi::c_uchar") = (Ty.path "u8").
  
  Axiom c_short : (Ty.path "core::ffi::c_short") = (Ty.path "i16").
  
  Axiom c_ushort : (Ty.path "core::ffi::c_ushort") = (Ty.path "u16").
  
  Axiom c_int : (Ty.path "core::ffi::c_int") = (Ty.path "i32").
  
  Axiom c_uint : (Ty.path "core::ffi::c_uint") = (Ty.path "u32").
  
  Axiom c_long : (Ty.path "core::ffi::c_long") = (Ty.path "i64").
  
  Axiom c_ulong : (Ty.path "core::ffi::c_ulong") = (Ty.path "u64").
  
  Axiom c_longlong : (Ty.path "core::ffi::c_longlong") = (Ty.path "i64").
  
  Axiom c_ulonglong : (Ty.path "core::ffi::c_ulonglong") = (Ty.path "u64").
  
  Axiom c_float : (Ty.path "core::ffi::c_float") = (Ty.path "f32").
  
  Axiom c_double : (Ty.path "core::ffi::c_double") = (Ty.path "f64").
  
  Axiom c_size_t : (Ty.path "core::ffi::c_size_t") = (Ty.path "usize").
  
  Axiom c_ptrdiff_t : (Ty.path "core::ffi::c_ptrdiff_t") = (Ty.path "isize").
  
  Axiom c_ssize_t : (Ty.path "core::ffi::c_ssize_t") = (Ty.path "isize").
  
  Module c_char_definition.
    Axiom c_char : (Ty.path "core::ffi::c_char_definition::c_char") = (Ty.path "i8").
  End c_char_definition.
  
  Module c_int_definition.
    Axiom c_int : (Ty.path "core::ffi::c_int_definition::c_int") = (Ty.path "i32").
    
    Axiom c_uint : (Ty.path "core::ffi::c_int_definition::c_uint") = (Ty.path "u32").
  End c_int_definition.
  
  Module c_long_definition.
    Axiom c_long : (Ty.path "core::ffi::c_long_definition::c_long") = (Ty.path "i64").
    
    Axiom c_ulong : (Ty.path "core::ffi::c_long_definition::c_ulong") = (Ty.path "u64").
  End c_long_definition.
  
  (*
  Enum c_void
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "__variant1";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "__variant2";
          item := StructTuple [];
          discriminant := None;
        }
      ];
  }
  *)
  
  Module Impl_core_fmt_Debug_for_core_ffi_c_void.
    Definition Self : Ty.t := Ty.path "core::ffi::c_void".
    
    (*
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            f.debug_struct("c_void").finish()
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::builders::DebugStruct",
              "finish",
              []
            |),
            [
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "core::fmt::Formatter",
                    "debug_struct",
                    []
                  |),
                  [ M.read (| f |); M.read (| Value.String "c_void" |) ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_ffi_c_void.
End ffi.
