diff --git a/src/ir.cpp b/src/ir.cpp index f76ed753d538a81dadbe3567d691f1cb9ad1cba5..9d5f59d1879346579f8c5cc713965435d54c3932 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -7009,7 +7009,7 @@ static IrInstruction *ir_get_const_ptr(IrAnalyze *ira, IrInstruction *instructio if (pointee_type->id == TypeTableEntryIdMetaType) { TypeTableEntry *type_entry = pointee->data.x_type; if (type_entry->id == TypeTableEntryIdUnreachable) { - ir_add_error(ira, instruction, buf_sprintf("pointer to unreachable not allowed")); + ir_add_error(ira, instruction, buf_sprintf("pointer to noreturn not allowed")); return ira->codegen->invalid_instruction; } diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 498931b659452d5ce1c143226167897e9e984a8e..223646e76710dad9d0c8430a3f5ce5417227feae 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -372,10 +372,10 @@ pub fn addCases(cases: &tests.CompileErrorContext) void { \\export fn entry() void { _ = a(); } , ".tmp_source.zig:1:8: error: use of undeclared identifier 'bogus'"); - cases.add("pointer to unreachable", + cases.add("pointer to noreturn", \\fn a() &noreturn {} \\export fn entry() void { _ = a(); } - , ".tmp_source.zig:1:9: error: pointer to unreachable not allowed"); + , ".tmp_source.zig:1:9: error: pointer to noreturn not allowed"); cases.add("unreachable code", \\export fn a() void {