| ... | @@ -23353,7 +23353,7 @@ fn ptrCastFull( | ... | @@ -23353,7 +23353,7 @@ fn ptrCastFull( |
| 23353 | if (src_info.flags.size == .C) break :check_size; | 23353 | if (src_info.flags.size == .C) break :check_size; |
| 23354 | if (dest_info.flags.size == .C) break :check_size; | 23354 | if (dest_info.flags.size == .C) break :check_size; |
| 23355 | return sema.failWithOwnedErrorMsg(block, msg: { | 23355 | return sema.failWithOwnedErrorMsg(block, msg: { |
| 23356 | const msg = try sema.errMsg(src, "cannot implicitly convert {s} pointer to {s} pointer", .{ | 23356 | const msg = try sema.errMsg(src, "cannot implicitly convert {s} to {s}", .{ |
| 23357 | pointerSizeString(src_info.flags.size), | 23357 | pointerSizeString(src_info.flags.size), |
| 23358 | pointerSizeString(dest_info.flags.size), | 23358 | pointerSizeString(dest_info.flags.size), |
| 23359 | }); | 23359 | }); |
| ... | @@ -30145,7 +30145,7 @@ const InMemoryCoercionResult = union(enum) { | ... | @@ -30145,7 +30145,7 @@ const InMemoryCoercionResult = union(enum) { |
| 30145 | break; | 30145 | break; |
| 30146 | }, | 30146 | }, |
| 30147 | .ptr_size => |size| { | 30147 | .ptr_size => |size| { |
| 30148 | try sema.errNote(src, msg, "a {s} pointer cannot cast into a {s} pointer", .{ pointerSizeString(size.actual), pointerSizeString(size.wanted) }); | 30148 | try sema.errNote(src, msg, "a {s} cannot cast into a {s}", .{ pointerSizeString(size.actual), pointerSizeString(size.wanted) }); |
| 30149 | break; | 30149 | break; |
| 30150 | }, | 30150 | }, |
| 30151 | .ptr_allowzero => |pair| { | 30151 | .ptr_allowzero => |pair| { |
| ... | @@ -30224,10 +30224,10 @@ const InMemoryCoercionResult = union(enum) { | ... | @@ -30224,10 +30224,10 @@ const InMemoryCoercionResult = union(enum) { |
| 30224 | | 30224 | |
| 30225 | fn pointerSizeString(size: std.builtin.Type.Pointer.Size) []const u8 { | 30225 | fn pointerSizeString(size: std.builtin.Type.Pointer.Size) []const u8 { |
| 30226 | return switch (size) { | 30226 | return switch (size) { |
| 30227 | .One => "single", | 30227 | .One => "single pointer", |
| 30228 | .Many => "many", | 30228 | .Many => "many pointer", |
| 30229 | .C => "C", | 30229 | .C => "C pointer", |
| 30230 | .Slice => unreachable, | 30230 | .Slice => "slice", |
| 30231 | }; | 30231 | }; |
| 30232 | } | 30232 | } |
| 30233 | | 30233 | |