aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2022-10-03 19:52:39 +0200
committerr00ster91 <r00ster91@proton.me>2022-10-05 21:19:10 +0200
commit654e0b6679f3436bacbf685223d6ab68f707a62f (patch)
tree3d643918bf5ab0e1a0754eeca210ee63cdd452e4 /src
parent34835bbbcfe81cc87e823d14dc9b25e698ad5edc (diff)
downloadzig-654e0b6679f3436bacbf685223d6ab68f707a62f.tar.gz
zig-654e0b6679f3436bacbf685223d6ab68f707a62f.zip
fix(text): hyphenation and other fixes
Diffstat (limited to 'src')
-rw-r--r--src/Sema.zig12
-rw-r--r--src/type.zig2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index aed09d6201..9821cf08de 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -5039,7 +5039,7 @@ fn analyzeBlockBody(
const valid_rt = try sema.validateRunTimeType(child_block, type_src, resolved_ty, false);
if (!valid_rt) {
const msg = msg: {
- const msg = try sema.errMsg(child_block, type_src, "value with comptime only type '{}' depends on runtime control flow", .{resolved_ty.fmt(mod)});
+ const msg = try sema.errMsg(child_block, type_src, "value with comptime-only type '{}' depends on runtime control flow", .{resolved_ty.fmt(mod)});
errdefer msg.destroy(sema.gpa);
const runtime_src = child_block.runtime_cond orelse child_block.runtime_loop.?;
@@ -5801,12 +5801,12 @@ fn addComptimeReturnTypeNote(
break :blk func_src.toSrcLoc(src_decl);
};
if (return_ty.tag() == .generic_poison) {
- return sema.mod.errNoteNonLazy(src_loc, parent, "generic function is instantiated with a comptime only return type", .{});
+ return sema.mod.errNoteNonLazy(src_loc, parent, "generic function is instantiated with a comptime-only return type", .{});
}
try sema.mod.errNoteNonLazy(
src_loc,
parent,
- "function is being called at comptime because it returns a comptime only type '{}'",
+ "function is being called at comptime because it returns a comptime-only type '{}'",
.{return_ty.fmt(sema.mod)},
);
try sema.explainWhyTypeIsComptime(block, func_src, parent, src_loc, return_ty);
@@ -6343,7 +6343,7 @@ fn analyzeInlineCallArg(
new_fn_info.param_types[arg_i.*] = param_ty;
const uncasted_arg = uncasted_args[arg_i.*];
if (try sema.typeRequiresComptime(param_ty)) {
- _ = sema.resolveConstMaybeUndefVal(arg_block, arg_src, uncasted_arg, "argument to parameter with comptime only type must be comptime known") catch |err| {
+ _ = sema.resolveConstMaybeUndefVal(arg_block, arg_src, uncasted_arg, "argument to parameter with comptime-only type must be comptime known") catch |err| {
if (err == error.AnalysisFail and sema.err != null) {
try sema.addComptimeReturnTypeNote(arg_block, func, func_src, ret_ty, sema.err.?, comptime_only_ret_ty);
}
@@ -8026,7 +8026,7 @@ fn funcCommon(
return sema.failWithOwnedErrorMsg(msg);
}
- // If the return type is comptime only but not dependent on parameters then all parameter types also need to be comptime
+ // If the return type is comptime-only but not dependent on parameters then all parameter types also need to be comptime
if (!sema.is_generic_instantiation and has_body and ret_ty_requires_comptime) comptime_check: {
for (block.params.items) |param| {
if (!param.is_comptime) break;
@@ -8035,7 +8035,7 @@ fn funcCommon(
const msg = try sema.errMsg(
block,
ret_ty_src,
- "function with comptime only return type '{}' requires all parameters to be comptime",
+ "function with comptime-only return type '{}' requires all parameters to be comptime",
.{return_type.fmt(sema.mod)},
);
try sema.explainWhyTypeIsComptime(block, ret_ty_src, msg, ret_ty_src.toSrcLoc(sema.owner_decl), return_type);
diff --git a/src/type.zig b/src/type.zig
index 1fef525062..b6f85b7390 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -2318,7 +2318,7 @@ pub const Type = extern union {
/// * the type has only one possible value, making its ABI size 0.
/// - an enum with an explicit tag type has the ABI size of the integer tag type,
/// making it one-possible-value only if the integer tag type has 0 bits.
- /// When `ignore_comptime_only` is true, then types that are comptime only
+ /// When `ignore_comptime_only` is true, then types that are comptime-only
/// may return false positives.
pub fn hasRuntimeBitsAdvanced(
ty: Type,