| author | |
| committer | |
| log | fe4ea31f7e9e1c8caea6a1df107b91e8ea1a7b8a |
| tree | 09f58d195c9b6efcea57343cd5a184517fe7a812 |
| parent | a9785fe8eef564011b4266e8a1b9aa15b7e37189 |
Most error messages already use single quotes for everything
so this makes the remaining ones consistent.10 files changed, 17 insertions(+), 17 deletions(-)
src/Sema.zig+5-5| ... | ... | @@ -3294,7 +3294,7 @@ fn ensureResultUsed( |
| 3294 | 3294 | const msg = msg: { |
| 3295 | 3295 | const msg = try sema.errMsg(block, src, "error is ignored", .{}); |
| 3296 | 3296 | errdefer msg.destroy(sema.gpa); |
| 3297 | try sema.errNote(block, src, msg, "consider using `try`, `catch`, or `if`", .{}); | |
| 3297 | try sema.errNote(block, src, msg, "consider using 'try', 'catch', or 'if'", .{}); | |
| 3298 | 3298 | break :msg msg; |
| 3299 | 3299 | }; |
| 3300 | 3300 | return sema.failWithOwnedErrorMsg(msg); |
| ... | ... | @@ -3325,7 +3325,7 @@ fn zirEnsureResultNonError(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com |
| 3325 | 3325 | const msg = msg: { |
| 3326 | 3326 | const msg = try sema.errMsg(block, src, "error is discarded", .{}); |
| 3327 | 3327 | errdefer msg.destroy(sema.gpa); |
| 3328 | try sema.errNote(block, src, msg, "consider using `try`, `catch`, or `if`", .{}); | |
| 3328 | try sema.errNote(block, src, msg, "consider using 'try', 'catch', or 'if'", .{}); | |
| 3329 | 3329 | break :msg msg; |
| 3330 | 3330 | }; |
| 3331 | 3331 | return sema.failWithOwnedErrorMsg(msg); |
| ... | ... | @@ -8477,7 +8477,7 @@ fn handleExternLibName( |
| 8477 | 8477 | return sema.fail( |
| 8478 | 8478 | block, |
| 8479 | 8479 | src_loc, |
| 8480 | "dependency on dynamic library '{s}' requires enabling Position Independent Code. Fixed by `-l{s}` or `-fPIC`.", | |
| 8480 | "dependency on dynamic library '{s}' requires enabling Position Independent Code. Fixed by '-l{s}' or '-fPIC'.", | |
| 8481 | 8481 | .{ lib_name, lib_name }, |
| 8482 | 8482 | ); |
| 8483 | 8483 | } |
| ... | ... | @@ -25150,7 +25150,7 @@ fn coerceExtra( |
| 25150 | 25150 | (try sema.coerceInMemoryAllowed(block, inst_ty.errorUnionPayload(), dest_ty, false, target, dest_ty_src, inst_src)) == .ok) |
| 25151 | 25151 | { |
| 25152 | 25152 | try sema.errNote(block, inst_src, msg, "cannot convert error union to payload type", .{}); |
| 25153 | try sema.errNote(block, inst_src, msg, "consider using `try`, `catch`, or `if`", .{}); | |
| 25153 | try sema.errNote(block, inst_src, msg, "consider using 'try', 'catch', or 'if'", .{}); | |
| 25154 | 25154 | } |
| 25155 | 25155 | |
| 25156 | 25156 | // ?T to T |
| ... | ... | @@ -25159,7 +25159,7 @@ fn coerceExtra( |
| 25159 | 25159 | (try sema.coerceInMemoryAllowed(block, inst_ty.optionalChild(&buf), dest_ty, false, target, dest_ty_src, inst_src)) == .ok) |
| 25160 | 25160 | { |
| 25161 | 25161 | try sema.errNote(block, inst_src, msg, "cannot convert optional to payload type", .{}); |
| 25162 | try sema.errNote(block, inst_src, msg, "consider using `.?`, `orelse`, or `if`", .{}); | |
| 25162 | try sema.errNote(block, inst_src, msg, "consider using '.?', 'orelse', or 'if'", .{}); | |
| 25163 | 25163 | } |
| 25164 | 25164 | |
| 25165 | 25165 | try in_memory_result.report(sema, block, inst_src, msg); |
test/cases/compile_errors/assigning_to_struct_or_union_fields_that_are_not_optionals_with_a_function_that_returns_an_optional.zig+1-1| ... | ... | @@ -20,4 +20,4 @@ export fn entry() void { |
| 20 | 20 | // |
| 21 | 21 | // :11:27: error: expected type 'u8', found '?u8' |
| 22 | 22 | // :11:27: note: cannot convert optional to payload type |
| 23 | // :11:27: note: consider using `.?`, `orelse`, or `if` | |
| 23 | // :11:27: note: consider using '.?', 'orelse', or 'if' |
test/cases/compile_errors/discarding_error_value.zig+1-1| ... | ... | @@ -10,4 +10,4 @@ fn foo() !void { |
| 10 | 10 | // target=native |
| 11 | 11 | // |
| 12 | 12 | // :2:12: error: error is discarded |
| 13 | // :2:12: note: consider using `try`, `catch`, or `if` | |
| 13 | // :2:12: note: consider using 'try', 'catch', or 'if' |
test/cases/compile_errors/helpful_return_type_error_message.zig+2-2| ... | ... | @@ -26,7 +26,7 @@ export fn quux() u32 { |
| 26 | 26 | // :11:15: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(tmp.bar)).Fn.return_type.?).ErrorUnion.error_set!u32' |
| 27 | 27 | // :10:17: note: function cannot return an error |
| 28 | 28 | // :11:15: note: cannot convert error union to payload type |
| 29 | // :11:15: note: consider using `try`, `catch`, or `if` | |
| 29 | // :11:15: note: consider using 'try', 'catch', or 'if' | |
| 30 | 30 | // :15:14: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(tmp.bar)).Fn.return_type.?).ErrorUnion.error_set!u32' |
| 31 | 31 | // :15:14: note: cannot convert error union to payload type |
| 32 | // :15:14: note: consider using `try`, `catch`, or `if` | |
| 32 | // :15:14: note: consider using 'try', 'catch', or 'if' |
test/cases/compile_errors/ignored_deferred_function_call.zig+1-1| ... | ... | @@ -8,4 +8,4 @@ fn bar() anyerror!i32 { return 0; } |
| 8 | 8 | // target=native |
| 9 | 9 | // |
| 10 | 10 | // :2:14: error: error is ignored |
| 11 | // :2:14: note: consider using `try`, `catch`, or `if` | |
| 11 | // :2:14: note: consider using 'try', 'catch', or 'if' |
test/cases/compile_errors/ignored_expression_in_while_continuation.zig+3-3| ... | ... | @@ -18,8 +18,8 @@ fn bad() anyerror!void { |
| 18 | 18 | // target=native |
| 19 | 19 | // |
| 20 | 20 | // :2:24: error: error is ignored |
| 21 | // :2:24: note: consider using `try`, `catch`, or `if` | |
| 21 | // :2:24: note: consider using 'try', 'catch', or 'if' | |
| 22 | 22 | // :6:25: error: error is ignored |
| 23 | // :6:25: note: consider using `try`, `catch`, or `if` | |
| 23 | // :6:25: note: consider using 'try', 'catch', or 'if' | |
| 24 | 24 | // :10:25: error: error is ignored |
| 25 | // :10:25: note: consider using `try`, `catch`, or `if` | |
| 25 | // :10:25: note: consider using 'try', 'catch', or 'if' |
test/cases/compile_errors/issue_5618_coercion_of_optional_anyopaque_to_anyopaque_must_fail.zig+1-1| ... | ... | @@ -10,5 +10,5 @@ export fn foo() void { |
| 10 | 10 | // |
| 11 | 11 | // :4:9: error: expected type '*anyopaque', found '?*anyopaque' |
| 12 | 12 | // :4:9: note: cannot convert optional to payload type |
| 13 | // :4:9: note: consider using `.?`, `orelse`, or `if` | |
| 13 | // :4:9: note: consider using '.?', 'orelse', or 'if' | |
| 14 | 14 | // :4:9: note: '?*anyopaque' could have null values which are illegal in type '*anyopaque' |
test/cases/compile_errors/regression_test_2980_base_type_u32_is_not_type_checked_properly_when_assigning_a_value_within_a_struct.zig+1-1| ... | ... | @@ -20,4 +20,4 @@ export fn entry() void { |
| 20 | 20 | // |
| 21 | 21 | // :12:25: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(tmp.get_uval)).Fn.return_type.?).ErrorUnion.error_set!u32' |
| 22 | 22 | // :12:25: note: cannot convert error union to payload type |
| 23 | // :12:25: note: consider using `try`, `catch`, or `if` | |
| 23 | // :12:25: note: consider using 'try', 'catch', or 'if' |
test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr.zig+1-1| ... | ... | @@ -17,4 +17,4 @@ pub const Container = struct { |
| 17 | 17 | // |
| 18 | 18 | // :3:36: error: expected type 'i32', found '?i32' |
| 19 | 19 | // :3:36: note: cannot convert optional to payload type |
| 20 | // :3:36: note: consider using `.?`, `orelse`, or `if` | |
| 20 | // :3:36: note: consider using '.?', 'orelse', or 'if' |
test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr_generic_call.zig+1-1| ... | ... | @@ -17,4 +17,4 @@ pub const Container = struct { |
| 17 | 17 | // |
| 18 | 18 | // :3:36: error: expected type 'i32', found '?i32' |
| 19 | 19 | // :3:36: note: cannot convert optional to payload type |
| 20 | // :3:36: note: consider using `.?`, `orelse`, or `if` | |
| 20 | // :3:36: note: consider using '.?', 'orelse', or 'if' |