authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-06-25 02:23:33+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-06-25 13:28:31+01:00
log5311916928ac627b86549099ac76f82f151fb662
tree488b87bee39a4358a278278015abc5ab29119da7
parent3f04231600e7ec2e16f5fb33f2e81eea24bdc41b
signaturelock-open Commit is signed but in an unrecognized format.

langref: neaten up @errSetCast example


1 files changed, 1 insertions(+), 1 deletions(-)

doc/langref.html.in+1-1
...@@ -10267,7 +10267,7 @@ pub fn main() void {...@@ -10267,7 +10267,7 @@ pub fn main() void {
10267 foo(Set1.B);10267 foo(Set1.B);
10268}10268}
10269fn foo(set1: Set1) void {10269fn foo(set1: Set1) void {
10270 const x = @as(Set2, @errSetCast(set1));10270 const x: Set2 = @errSetCast(set1);
10271 std.debug.print("value: {}\n", .{x});10271 std.debug.print("value: {}\n", .{x});
10272}10272}
10273 {#code_end#}10273 {#code_end#}