From 8e2aaf6aed5213736f6cbbb374098e2394f19429 Mon Sep 17 00:00:00 2001 From: r00ster91 Date: Wed, 5 Oct 2022 21:17:06 +0200 Subject: [PATCH] fix(text): hyphenate "runtime" adjectives --- lib/std/bit_set.zig | 6 +++--- src/Module.zig | 2 +- src/Sema.zig | 6 +++--- src/arch/riscv64/CodeGen.zig | 2 +- test/behavior/align.zig | 2 +- test/cases/compile_errors/dereference_anyopaque.zig | 8 ++++---- ...t_variables_of_things_that_require_const_variables.zig | 2 +- ...n-inline_for_loop_on_a_type_that_requires_comptime.zig | 2 +- .../runtime_index_into_comptime_type_slice.zig | 2 +- .../compile_errors/runtime_indexing_comptime_array.zig | 6 +++--- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/std/bit_set.zig b/lib/std/bit_set.zig index 992f19151b67c4722455596fd80d7c61634807f5..2c4e50dee36757c32e514d8e2a71c845ccfdf11e 100644 --- a/lib/std/bit_set.zig +++ b/lib/std/bit_set.zig @@ -23,7 +23,7 @@ //! size. The interfaces of these two types match exactly, except for fields. //! //! DynamicBitSet: -//! A bit set with runtime known size, backed by an allocated slice +//! A bit set with runtime-known size, backed by an allocated slice //! of usize. //! //! DynamicBitSetUnmanaged: @@ -515,7 +515,7 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type { }; } -/// A bit set with runtime known size, backed by an allocated slice +/// A bit set with runtime-known size, backed by an allocated slice /// of usize. The allocator must be tracked externally by the user. pub const DynamicBitSetUnmanaged = struct { const Self = @This(); @@ -843,7 +843,7 @@ pub const DynamicBitSetUnmanaged = struct { } }; -/// A bit set with runtime known size, backed by an allocated slice +/// A bit set with runtime-known size, backed by an allocated slice /// of usize. Thin wrapper around DynamicBitSetUnmanaged which keeps /// track of the allocator instance. pub const DynamicBitSet = struct { diff --git a/src/Module.zig b/src/Module.zig index b4792b6e2888a72588c7071fb715311b674eb13f..17c12438f7de15e5fc7acbda8346a1999baf184d 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -3494,7 +3494,7 @@ fn freeExportList(gpa: Allocator, export_list: []*Export) void { const data_has_safety_tag = @sizeOf(Zir.Inst.Data) != 8; // TODO This is taking advantage of matching stage1 debug union layout. // We need a better language feature for initializing a union with -// a runtime known tag. +// a runtime-known tag. const Stage1DataLayout = extern struct { data: [8]u8 align(@alignOf(Zir.Inst.Data)), safety_tag: u8, diff --git a/src/Sema.zig b/src/Sema.zig index df0ab8ef9a518d3f53bd7cc4a8848a2e7a04c26b..7501e79b3c8eaef676dc5e54e4bf6cd73ba555e2 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -4326,7 +4326,7 @@ fn zirValidateDeref(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileErr const msg = try sema.errMsg( block, src, - "values of type '{}' must be comptime-known, but operand value is runtime known", + "values of type '{}' must be comptime-known, but operand value is runtime-known", .{elem_ty.fmt(sema.mod)}, ); errdefer msg.destroy(sema.gpa); @@ -22602,7 +22602,7 @@ fn validateRuntimeElemAccess( const msg = try sema.errMsg( block, elem_index_src, - "values of type '{}' must be comptime-known, but index value is runtime known", + "values of type '{}' must be comptime-known, but index value is runtime-known", .{parent_ty.fmt(sema.mod)}, ); errdefer msg.destroy(sema.gpa); @@ -27177,7 +27177,7 @@ fn cmpNumeric( }; // TODO handle comparisons against lazy zero values - // Some values can be compared against zero without being runtime known or without forcing + // Some values can be compared against zero without being runtime-known or without forcing // a full resolution of their value, for example `@sizeOf(@Frame(function))` is known to // always be nonzero, and we benefit from not forcing the full evaluation and stack frame layout // of this function if we don't need to. diff --git a/src/arch/riscv64/CodeGen.zig b/src/arch/riscv64/CodeGen.zig index 1dad5a4ac651ba8de35712d571016c2d0e782c20..87e81748f949f884262e2c1199328666882e3e8d 100644 --- a/src/arch/riscv64/CodeGen.zig +++ b/src/arch/riscv64/CodeGen.zig @@ -1769,7 +1769,7 @@ fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallOptions. return self.fail("TODO implement calling bitcasted functions", .{}); } } else { - return self.fail("TODO implement calling runtime known function pointer", .{}); + return self.fail("TODO implement calling runtime-known function pointer", .{}); } } else if (self.bin_file.cast(link.File.Coff)) |_| { return self.fail("TODO implement calling in COFF for {}", .{self.target.cpu.arch}); diff --git a/test/behavior/align.zig b/test/behavior/align.zig index 5270aa96926af253fcfd2837d2fe9265012d93e4..a131cc8df73ba6b9ddb7344829c7c1123f062b08 100644 --- a/test/behavior/align.zig +++ b/test/behavior/align.zig @@ -400,7 +400,7 @@ test "function callconv expression depends on generic parameter" { comptime try S.doTheTest(); } -test "runtime known array index has best alignment possible" { +test "runtime-known array index has best alignment possible" { if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO // take full advantage of over-alignment diff --git a/test/cases/compile_errors/dereference_anyopaque.zig b/test/cases/compile_errors/dereference_anyopaque.zig index 8aaa6004e3dd7035c1b90f361be2b96d547fbf39..854d2f2dfbe00e0c7204cf3a3654d5dd8e4d1062 100644 --- a/test/cases/compile_errors/dereference_anyopaque.zig +++ b/test/cases/compile_errors/dereference_anyopaque.zig @@ -45,11 +45,11 @@ pub export fn entry() void { // backend=llvm // // :11:22: error: comparison of 'void' with null -// :25:51: error: values of type 'anyopaque' must be comptime-known, but operand value is runtime known +// :25:51: error: values of type 'anyopaque' must be comptime-known, but operand value is runtime-known // :25:51: note: opaque type 'anyopaque' has undefined size -// :25:51: error: values of type 'fn(*anyopaque, usize, u29, u29, usize) error{OutOfMemory}![]u8' must be comptime-known, but operand value is runtime known +// :25:51: error: values of type 'fn(*anyopaque, usize, u29, u29, usize) error{OutOfMemory}![]u8' must be comptime-known, but operand value is runtime-known // :25:51: note: use '*const fn(*anyopaque, usize, u29, u29, usize) error{OutOfMemory}![]u8' for a function pointer type -// :25:51: error: values of type 'fn(*anyopaque, []u8, u29, usize, u29, usize) ?usize' must be comptime-known, but operand value is runtime known +// :25:51: error: values of type 'fn(*anyopaque, []u8, u29, usize, u29, usize) ?usize' must be comptime-known, but operand value is runtime-known // :25:51: note: use '*const fn(*anyopaque, []u8, u29, usize, u29, usize) ?usize' for a function pointer type -// :25:51: error: values of type 'fn(*anyopaque, []u8, u29, usize) void' must be comptime-known, but operand value is runtime known +// :25:51: error: values of type 'fn(*anyopaque, []u8, u29, usize) void' must be comptime-known, but operand value is runtime-known // :25:51: note: use '*const fn(*anyopaque, []u8, u29, usize) void' for a function pointer type diff --git a/test/cases/compile_errors/non-const_variables_of_things_that_require_const_variables.zig b/test/cases/compile_errors/non-const_variables_of_things_that_require_const_variables.zig index 02bd9ac5a810d41a11dce7a1b3593255ed83af8e..cf65131a1f1e95ab612950935314e5d833a99484 100644 --- a/test/cases/compile_errors/non-const_variables_of_things_that_require_const_variables.zig +++ b/test/cases/compile_errors/non-const_variables_of_things_that_require_const_variables.zig @@ -39,7 +39,7 @@ const Opaque = opaque {}; // :14:8: error: variable of type 'comptime_float' must be const or comptime // :14:8: note: to modify this variable at runtime, it must be given an explicit fixed-size number type // :18:8: error: variable of type '@TypeOf(null)' must be const or comptime -// :22:19: error: values of type 'tmp.Opaque' must be comptime-known, but operand value is runtime known +// :22:19: error: values of type 'tmp.Opaque' must be comptime-known, but operand value is runtime-known // :22:19: note: opaque type 'tmp.Opaque' has undefined size // :26:8: error: variable of type 'type' must be const or comptime // :26:8: note: types are not available at runtime diff --git a/test/cases/compile_errors/non-inline_for_loop_on_a_type_that_requires_comptime.zig b/test/cases/compile_errors/non-inline_for_loop_on_a_type_that_requires_comptime.zig index 7e92806284a777989eac4a74b7a2ea972b1d14f4..ce72f912b87e8d991a9fae12ff2b3203c940428b 100644 --- a/test/cases/compile_errors/non-inline_for_loop_on_a_type_that_requires_comptime.zig +++ b/test/cases/compile_errors/non-inline_for_loop_on_a_type_that_requires_comptime.zig @@ -11,6 +11,6 @@ export fn entry() void { // backend=stage2 // target=native // -// :7:10: error: values of type '[2]tmp.Foo' must be comptime-known, but index value is runtime known +// :7:10: error: values of type '[2]tmp.Foo' must be comptime-known, but index value is runtime-known // :3:8: note: struct requires comptime because of this field // :3:8: note: types are not available at runtime diff --git a/test/cases/compile_errors/runtime_index_into_comptime_type_slice.zig b/test/cases/compile_errors/runtime_index_into_comptime_type_slice.zig index 9f04a2a4bd411a0f2bb548ecf5cf7ea1d39ec1ec..4c235ed94bc3251ead5b043d75b00874c22a3485 100644 --- a/test/cases/compile_errors/runtime_index_into_comptime_type_slice.zig +++ b/test/cases/compile_errors/runtime_index_into_comptime_type_slice.zig @@ -14,6 +14,6 @@ export fn entry() void { // backend=stage2 // target=native // -// :9:51: error: values of type '[]const builtin.Type.StructField' must be comptime-known, but index value is runtime known +// :9:51: error: values of type '[]const builtin.Type.StructField' must be comptime-known, but index value is runtime-known // :?:21: note: struct requires comptime because of this field // :?:21: note: types are not available at runtime diff --git a/test/cases/compile_errors/runtime_indexing_comptime_array.zig b/test/cases/compile_errors/runtime_indexing_comptime_array.zig index e2244944a55a8b4918746739e87a2aea74c89d83..ec5f8610eb5532d9955d81c20007a713d05a8092 100644 --- a/test/cases/compile_errors/runtime_indexing_comptime_array.zig +++ b/test/cases/compile_errors/runtime_indexing_comptime_array.zig @@ -24,9 +24,9 @@ pub export fn entry3() void { // target=native // backend=stage2 // -// :7:10: error: values of type '[2]fn() void' must be comptime-known, but index value is runtime known +// :7:10: error: values of type '[2]fn() void' must be comptime-known, but index value is runtime-known // :7:10: note: use '*const fn() void' for a function pointer type -// :15:18: error: values of type '[2]fn() void' must be comptime-known, but index value is runtime known +// :15:18: error: values of type '[2]fn() void' must be comptime-known, but index value is runtime-known // :15:17: note: use '*const fn() void' for a function pointer type -// :21:19: error: values of type '[2]fn() void' must be comptime-known, but index value is runtime known +// :21:19: error: values of type '[2]fn() void' must be comptime-known, but index value is runtime-known // :21:18: note: use '*const fn() void' for a function pointer type -- 2.54.0