diff --git a/doc/langref.html.in b/doc/langref.html.in index 790a8e14c4..f1141bf22d 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -10322,7 +10322,8 @@ fn readU32Be() u32 {}
{#syntax#}align{#endsyntax#}
- {#syntax#}align{#endsyntax#} can be used to specify the alignment of a pointer. It can also be used after a variable or function declaration to specify the alignment of pointers to that variable or function. + {#syntax#}align{#endsyntax#} can be used to specify the alignment of a pointer. + It can also be used after a variable or function declaration to specify the alignment of pointers to that variable or function. @@ -10366,7 +10367,8 @@ fn readU32Be() u32 {}
{#syntax#}anytype{#endsyntax#}
- Function parameters can be declared with {#syntax#}anytype{#endsyntax#} in place of the type. The parameter type will be inferred where the function is called. + Function parameters and struct fields can be declared with {#syntax#}anytype{#endsyntax#} in place of the type. + The type will be inferred where the function is called or the struct is instantiated. @@ -10399,7 +10401,8 @@ fn readU32Be() u32 {}
{#syntax#}await{#endsyntax#}
- {#syntax#}await{#endsyntax#} can be used to suspend the current function until the frame provided after the {#syntax#}await{#endsyntax#} completes. {#syntax#}await{#endsyntax#} copies the value returned from the target function's frame to the caller. + {#syntax#}await{#endsyntax#} can be used to suspend the current function until the frame provided after the {#syntax#}await{#endsyntax#} completes. + {#syntax#}await{#endsyntax#} copies the value returned from the target function's frame to the caller. @@ -10410,8 +10413,8 @@ fn readU32Be() u32 {}
{#syntax#}break{#endsyntax#}
- {#syntax#}break{#endsyntax#} can be used to exit a loop before iteration completes naturally. - It can also be used with a block label to return a value from the block. + {#syntax#}break{#endsyntax#} can be used with a block label to return a value from the block. + It can also be used to exit a loop before iteration completes naturally. @@ -10422,7 +10425,8 @@ fn readU32Be() u32 {}
{#syntax#}catch{#endsyntax#}
- {#syntax#}catch{#endsyntax#} can be used to provide a default value for an error union, or capture its error value in an expression. + {#syntax#}catch{#endsyntax#} can be used to evaluate an expression if the expression before it evaluates to an error. + The expression after the {#syntax#}catch{#endsyntax#} can optionally capture the error value. @@ -10446,6 +10450,7 @@ fn readU32Be() u32 {} {#syntax#}const{#endsyntax#} declares a variable that can not be modified. + Used as a pointer attribute, it denotes the value referenced by the pointer cannot be modified. @@ -10467,7 +10472,7 @@ fn readU32Be() u32 {}
{#syntax#}defer{#endsyntax#}
- {#syntax#}defer{#endsyntax#} will execute an expression at the end of the current block. + {#syntax#}defer{#endsyntax#} will execute an expression when control flow leaves the current block. @@ -10478,7 +10483,8 @@ fn readU32Be() u32 {}
{#syntax#}else{#endsyntax#}
- {#syntax#}else{#endsyntax#} can be used to provide an alternate branch for {#syntax#}if{#endsyntax#}, {#syntax#}switch{#endsyntax#}, {#syntax#}while{#endsyntax#}, and {#syntax#}for{#endsyntax#} expressions. + {#syntax#}else{#endsyntax#} can be used to provide an alternate branch for {#syntax#}if{#endsyntax#}, {#syntax#}switch{#endsyntax#}, + {#syntax#}while{#endsyntax#}, and {#syntax#}for{#endsyntax#} expressions.