Fix grammar in error message

This commit is contained in:
daurnimator 2020-03-08 19:18:06 +11:00
parent 9e60c89601
commit b85bb152bf
No known key found for this signature in database
GPG key ID: 45B429A8F9D9D22A
2 changed files with 2 additions and 2 deletions

View file

@ -30246,7 +30246,7 @@ static Error ir_resolve_lazy_raw(AstNode *source_node, ZigValue *val) {
return ErrorSemanticAnalyzeFail; return ErrorSemanticAnalyzeFail;
} else if (elem_type->id == ZigTypeIdOpaque) { } else if (elem_type->id == ZigTypeIdOpaque) {
ir_add_error(ira, &lazy_ptr_type->elem_type->base, ir_add_error(ira, &lazy_ptr_type->elem_type->base,
buf_sprintf("C pointers cannot point opaque types")); buf_sprintf("C pointers cannot point to opaque types"));
return ErrorSemanticAnalyzeFail; return ErrorSemanticAnalyzeFail;
} else if (lazy_ptr_type->is_allowzero) { } else if (lazy_ptr_type->is_allowzero) {
ir_add_error(ira, &lazy_ptr_type->elem_type->base, ir_add_error(ira, &lazy_ptr_type->elem_type->base,

View file

@ -1592,7 +1592,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\ var y: [*c]c_void = x; \\ var y: [*c]c_void = x;
\\} \\}
, &[_][]const u8{ , &[_][]const u8{
"tmp.zig:3:16: error: C pointers cannot point opaque types", "tmp.zig:3:16: error: C pointers cannot point to opaque types",
}); });
cases.add("directly embedding opaque type in struct and union", cases.add("directly embedding opaque type in struct and union",