mirror of
https://github.com/ziglang/zig.git
synced 2026-02-05 06:03:38 +00:00
stage2: remove unused parameter from importPkg
This commit is contained in:
parent
f203334878
commit
fee5aad699
@ -1639,7 +1639,7 @@ pub fn update(self: *Compilation) !void {
|
||||
// Make sure std.zig is inside the import_table. We unconditionally need
|
||||
// it for start.zig.
|
||||
const std_pkg = module.root_pkg.table.get("std").?;
|
||||
_ = try module.importPkg(module.root_pkg, std_pkg);
|
||||
_ = try module.importPkg(std_pkg);
|
||||
|
||||
// Put a work item in for every known source file to detect if
|
||||
// it changed, and, if so, re-compute ZIR and then queue the job
|
||||
|
||||
@ -2831,7 +2831,7 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl: *Decl) InnerError!void {
|
||||
}
|
||||
|
||||
pub fn semaPkg(mod: *Module, pkg: *Package) !void {
|
||||
const file = (try mod.importPkg(mod.root_pkg, pkg)).file;
|
||||
const file = (try mod.importPkg(pkg)).file;
|
||||
return mod.semaFile(file);
|
||||
}
|
||||
|
||||
@ -3130,8 +3130,7 @@ pub const ImportFileResult = struct {
|
||||
is_new: bool,
|
||||
};
|
||||
|
||||
pub fn importPkg(mod: *Module, cur_pkg: *Package, pkg: *Package) !ImportFileResult {
|
||||
_ = cur_pkg;
|
||||
pub fn importPkg(mod: *Module, pkg: *Package) !ImportFileResult {
|
||||
const gpa = mod.gpa;
|
||||
|
||||
// The resolved path is used as the key in the import table, to detect if
|
||||
@ -3184,7 +3183,7 @@ pub fn importFile(
|
||||
import_string: []const u8,
|
||||
) !ImportFileResult {
|
||||
if (cur_file.pkg.table.get(import_string)) |pkg| {
|
||||
return mod.importPkg(cur_file.pkg, pkg);
|
||||
return mod.importPkg(pkg);
|
||||
}
|
||||
const gpa = mod.gpa;
|
||||
|
||||
|
||||
@ -7556,7 +7556,7 @@ fn getBuiltinType(
|
||||
) InnerError!Type {
|
||||
const mod = sema.mod;
|
||||
const std_pkg = mod.root_pkg.table.get("std").?;
|
||||
const std_file = (mod.importPkg(mod.root_pkg, std_pkg) catch unreachable).file;
|
||||
const std_file = (mod.importPkg(std_pkg) catch unreachable).file;
|
||||
const opt_builtin_inst = try sema.analyzeNamespaceLookup(
|
||||
block,
|
||||
src,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user