aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Sema.zig10
-rw-r--r--test/cases/compile_errors/assigning_to_struct_or_union_fields_that_are_not_optionals_with_a_function_that_returns_an_optional.zig2
-rw-r--r--test/cases/compile_errors/discarding_error_value.zig2
-rw-r--r--test/cases/compile_errors/helpful_return_type_error_message.zig4
-rw-r--r--test/cases/compile_errors/ignored_deferred_function_call.zig2
-rw-r--r--test/cases/compile_errors/ignored_expression_in_while_continuation.zig6
-rw-r--r--test/cases/compile_errors/issue_5618_coercion_of_optional_anyopaque_to_anyopaque_must_fail.zig2
-rw-r--r--test/cases/compile_errors/regression_test_2980_base_type_u32_is_not_type_checked_properly_when_assigning_a_value_within_a_struct.zig2
-rw-r--r--test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr.zig2
-rw-r--r--test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr_generic_call.zig2
10 files changed, 17 insertions, 17 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 712a684bf8..b4731d9509 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -3294,7 +3294,7 @@ fn ensureResultUsed(
const msg = msg: {
const msg = try sema.errMsg(block, src, "error is ignored", .{});
errdefer msg.destroy(sema.gpa);
- try sema.errNote(block, src, msg, "consider using `try`, `catch`, or `if`", .{});
+ try sema.errNote(block, src, msg, "consider using 'try', 'catch', or 'if'", .{});
break :msg msg;
};
return sema.failWithOwnedErrorMsg(msg);
@@ -3325,7 +3325,7 @@ fn zirEnsureResultNonError(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com
const msg = msg: {
const msg = try sema.errMsg(block, src, "error is discarded", .{});
errdefer msg.destroy(sema.gpa);
- try sema.errNote(block, src, msg, "consider using `try`, `catch`, or `if`", .{});
+ try sema.errNote(block, src, msg, "consider using 'try', 'catch', or 'if'", .{});
break :msg msg;
};
return sema.failWithOwnedErrorMsg(msg);
@@ -8477,7 +8477,7 @@ fn handleExternLibName(
return sema.fail(
block,
src_loc,
- "dependency on dynamic library '{s}' requires enabling Position Independent Code. Fixed by `-l{s}` or `-fPIC`.",
+ "dependency on dynamic library '{s}' requires enabling Position Independent Code. Fixed by '-l{s}' or '-fPIC'.",
.{ lib_name, lib_name },
);
}
@@ -25150,7 +25150,7 @@ fn coerceExtra(
(try sema.coerceInMemoryAllowed(block, inst_ty.errorUnionPayload(), dest_ty, false, target, dest_ty_src, inst_src)) == .ok)
{
try sema.errNote(block, inst_src, msg, "cannot convert error union to payload type", .{});
- try sema.errNote(block, inst_src, msg, "consider using `try`, `catch`, or `if`", .{});
+ try sema.errNote(block, inst_src, msg, "consider using 'try', 'catch', or 'if'", .{});
}
// ?T to T
@@ -25159,7 +25159,7 @@ fn coerceExtra(
(try sema.coerceInMemoryAllowed(block, inst_ty.optionalChild(&buf), dest_ty, false, target, dest_ty_src, inst_src)) == .ok)
{
try sema.errNote(block, inst_src, msg, "cannot convert optional to payload type", .{});
- try sema.errNote(block, inst_src, msg, "consider using `.?`, `orelse`, or `if`", .{});
+ try sema.errNote(block, inst_src, msg, "consider using '.?', 'orelse', or 'if'", .{});
}
try in_memory_result.report(sema, block, inst_src, msg);
diff --git a/test/cases/compile_errors/assigning_to_struct_or_union_fields_that_are_not_optionals_with_a_function_that_returns_an_optional.zig b/test/cases/compile_errors/assigning_to_struct_or_union_fields_that_are_not_optionals_with_a_function_that_returns_an_optional.zig
index 762eb284f2..530e5ffb74 100644
--- a/test/cases/compile_errors/assigning_to_struct_or_union_fields_that_are_not_optionals_with_a_function_that_returns_an_optional.zig
+++ b/test/cases/compile_errors/assigning_to_struct_or_union_fields_that_are_not_optionals_with_a_function_that_returns_an_optional.zig
@@ -20,4 +20,4 @@ export fn entry() void {
//
// :11:27: error: expected type 'u8', found '?u8'
// :11:27: note: cannot convert optional to payload type
-// :11:27: note: consider using `.?`, `orelse`, or `if`
+// :11:27: note: consider using '.?', 'orelse', or 'if'
diff --git a/test/cases/compile_errors/discarding_error_value.zig b/test/cases/compile_errors/discarding_error_value.zig
index 6dfe0be231..c24d517d3e 100644
--- a/test/cases/compile_errors/discarding_error_value.zig
+++ b/test/cases/compile_errors/discarding_error_value.zig
@@ -10,4 +10,4 @@ fn foo() !void {
// target=native
//
// :2:12: error: error is discarded
-// :2:12: note: consider using `try`, `catch`, or `if`
+// :2:12: note: consider using 'try', 'catch', or 'if'
diff --git a/test/cases/compile_errors/helpful_return_type_error_message.zig b/test/cases/compile_errors/helpful_return_type_error_message.zig
index b8e48036de..871e948537 100644
--- a/test/cases/compile_errors/helpful_return_type_error_message.zig
+++ b/test/cases/compile_errors/helpful_return_type_error_message.zig
@@ -26,7 +26,7 @@ export fn quux() u32 {
// :11:15: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(tmp.bar)).Fn.return_type.?).ErrorUnion.error_set!u32'
// :10:17: note: function cannot return an error
// :11:15: note: cannot convert error union to payload type
-// :11:15: note: consider using `try`, `catch`, or `if`
+// :11:15: note: consider using 'try', 'catch', or 'if'
// :15:14: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(tmp.bar)).Fn.return_type.?).ErrorUnion.error_set!u32'
// :15:14: note: cannot convert error union to payload type
-// :15:14: note: consider using `try`, `catch`, or `if`
+// :15:14: note: consider using 'try', 'catch', or 'if'
diff --git a/test/cases/compile_errors/ignored_deferred_function_call.zig b/test/cases/compile_errors/ignored_deferred_function_call.zig
index 05c4373705..b318baa16c 100644
--- a/test/cases/compile_errors/ignored_deferred_function_call.zig
+++ b/test/cases/compile_errors/ignored_deferred_function_call.zig
@@ -8,4 +8,4 @@ fn bar() anyerror!i32 { return 0; }
// target=native
//
// :2:14: error: error is ignored
-// :2:14: note: consider using `try`, `catch`, or `if`
+// :2:14: note: consider using 'try', 'catch', or 'if'
diff --git a/test/cases/compile_errors/ignored_expression_in_while_continuation.zig b/test/cases/compile_errors/ignored_expression_in_while_continuation.zig
index d7de0aac57..d108903c82 100644
--- a/test/cases/compile_errors/ignored_expression_in_while_continuation.zig
+++ b/test/cases/compile_errors/ignored_expression_in_while_continuation.zig
@@ -18,8 +18,8 @@ fn bad() anyerror!void {
// target=native
//
// :2:24: error: error is ignored
-// :2:24: note: consider using `try`, `catch`, or `if`
+// :2:24: note: consider using 'try', 'catch', or 'if'
// :6:25: error: error is ignored
-// :6:25: note: consider using `try`, `catch`, or `if`
+// :6:25: note: consider using 'try', 'catch', or 'if'
// :10:25: error: error is ignored
-// :10:25: note: consider using `try`, `catch`, or `if`
+// :10:25: note: consider using 'try', 'catch', or 'if'
diff --git a/test/cases/compile_errors/issue_5618_coercion_of_optional_anyopaque_to_anyopaque_must_fail.zig b/test/cases/compile_errors/issue_5618_coercion_of_optional_anyopaque_to_anyopaque_must_fail.zig
index f4716bc24d..95bba054b3 100644
--- a/test/cases/compile_errors/issue_5618_coercion_of_optional_anyopaque_to_anyopaque_must_fail.zig
+++ b/test/cases/compile_errors/issue_5618_coercion_of_optional_anyopaque_to_anyopaque_must_fail.zig
@@ -10,5 +10,5 @@ export fn foo() void {
//
// :4:9: error: expected type '*anyopaque', found '?*anyopaque'
// :4:9: note: cannot convert optional to payload type
-// :4:9: note: consider using `.?`, `orelse`, or `if`
+// :4:9: note: consider using '.?', 'orelse', or 'if'
// :4:9: note: '?*anyopaque' could have null values which are illegal in type '*anyopaque'
diff --git a/test/cases/compile_errors/regression_test_2980_base_type_u32_is_not_type_checked_properly_when_assigning_a_value_within_a_struct.zig b/test/cases/compile_errors/regression_test_2980_base_type_u32_is_not_type_checked_properly_when_assigning_a_value_within_a_struct.zig
index 09c496211a..1b951528bb 100644
--- a/test/cases/compile_errors/regression_test_2980_base_type_u32_is_not_type_checked_properly_when_assigning_a_value_within_a_struct.zig
+++ b/test/cases/compile_errors/regression_test_2980_base_type_u32_is_not_type_checked_properly_when_assigning_a_value_within_a_struct.zig
@@ -20,4 +20,4 @@ export fn entry() void {
//
// :12:25: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(tmp.get_uval)).Fn.return_type.?).ErrorUnion.error_set!u32'
// :12:25: note: cannot convert error union to payload type
-// :12:25: note: consider using `try`, `catch`, or `if`
+// :12:25: note: consider using 'try', 'catch', or 'if'
diff --git a/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr.zig b/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr.zig
index cc1d2c976a..26c1a8d9cf 100644
--- a/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr.zig
+++ b/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr.zig
@@ -17,4 +17,4 @@ pub const Container = struct {
//
// :3:36: error: expected type 'i32', found '?i32'
// :3:36: note: cannot convert optional to payload type
-// :3:36: note: consider using `.?`, `orelse`, or `if`
+// :3:36: note: consider using '.?', 'orelse', or 'if'
diff --git a/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr_generic_call.zig b/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr_generic_call.zig
index 897675d448..471f9cca04 100644
--- a/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr_generic_call.zig
+++ b/test/cases/compile_errors/result_location_incompatibility_mismatching_handle_is_ptr_generic_call.zig
@@ -17,4 +17,4 @@ pub const Container = struct {
//
// :3:36: error: expected type 'i32', found '?i32'
// :3:36: note: cannot convert optional to payload type
-// :3:36: note: consider using `.?`, `orelse`, or `if`
+// :3:36: note: consider using '.?', 'orelse', or 'if'