aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index c533f2fae7..5395be9f32 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -3159,7 +3159,7 @@ pub fn addModuleErrorMsg(mod: *Module, eb: *ErrorBundle.Wip, module_err_msg: Mod
const rt_file_path = try module_reference.src_loc.file_scope.fullPath(gpa);
defer gpa.free(rt_file_path);
ref_traces.appendAssumeCapacity(.{
- .decl_name = try eb.addString(ip.stringToSlice(module_reference.decl)),
+ .decl_name = try eb.addString(module_reference.decl.toSlice(ip)),
.src_loc = try eb.addSourceLocation(.{
.src_path = try eb.addString(rt_file_path),
.span_start = span.start,
@@ -4074,8 +4074,7 @@ fn workerCheckEmbedFile(
fn detectEmbedFileUpdate(comp: *Compilation, embed_file: *Module.EmbedFile) !void {
const mod = comp.module.?;
const ip = &mod.intern_pool;
- const sub_file_path = ip.stringToSlice(embed_file.sub_file_path);
- var file = try embed_file.owner.root.openFile(sub_file_path, .{});
+ var file = try embed_file.owner.root.openFile(embed_file.sub_file_path.toSlice(ip), .{});
defer file.close();
const stat = try file.stat();
@@ -4444,7 +4443,7 @@ fn reportRetryableEmbedFileError(
const ip = &mod.intern_pool;
const err_msg = try Module.ErrorMsg.create(gpa, src_loc, "unable to load '{}{s}': {s}", .{
embed_file.owner.root,
- ip.stringToSlice(embed_file.sub_file_path),
+ embed_file.sub_file_path.toSlice(ip),
@errorName(err),
});