diff --git a/doc/langref.html.in b/doc/langref.html.in index 926b053ca0..03e18378eb 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -2582,7 +2582,7 @@ test "Conversion between vectors, arrays, and slices" {
  • Supports slice syntax: {#syntax#}ptr[start..end]{#endsyntax#}
  • Supports pointer arithmetic: {#syntax#}ptr + x{#endsyntax#}, {#syntax#}ptr - x{#endsyntax#}
  • {#syntax#}T{#endsyntax#} must have a known size, which means that it cannot be - {#syntax#}c_void{#endsyntax#} or any other {#link|opaque type|opaque#}.
  • + {#syntax#}anyopaque{#endsyntax#} or any other {#link|opaque type|opaque#}. @@ -6269,8 +6269,8 @@ test "turn HashMap into a set with void" { value is deleted, as seen above.

    - {#syntax#}void{#endsyntax#} is distinct from {#syntax#}c_void{#endsyntax#}. - {#syntax#}void{#endsyntax#} has a known size of 0 bytes, and {#syntax#}c_void{#endsyntax#} has an unknown, but non-zero, size. + {#syntax#}void{#endsyntax#} is distinct from {#syntax#}anyopaque{#endsyntax#}. + {#syntax#}void{#endsyntax#} has a known size of 0 bytes, and {#syntax#}anyopaque{#endsyntax#} has an unknown, but non-zero, size.

    Expressions of type {#syntax#}void{#endsyntax#} are the only ones whose value can be ignored. For example: @@ -10618,8 +10618,10 @@ lib.addCSourceFile("src/lib.c", &[_][]const u8{

  • {#syntax#}c_longlong{#endsyntax#}
  • {#syntax#}c_ulonglong{#endsyntax#}
  • {#syntax#}c_longdouble{#endsyntax#}
  • -
  • {#syntax#}c_void{#endsyntax#}
  • +

    + To interop with the C {#syntax#}void{#endsyntax#} type, use {#syntax#}anyopaque{#endsyntax#}. +

    {#see_also|Primitive Types#} {#header_close#} {#header_open|Import from C Header File#}