Merge pull request #20637 from mlugg/comptime-resolution-strat

Type,Value: mark `ResolveStrat` parameter of type queries as `comptime`
This commit is contained in:
Matthew Lugg
2024-07-16 19:22:39 +01:00
committed by GitHub
9 changed files with 183 additions and 135 deletions

View File

@@ -3163,7 +3163,7 @@ pub fn unionFieldNormalAlignmentAdvanced(
pt: Zcu.PerThread,
loaded_union: InternPool.LoadedUnionType,
field_index: u32,
strat: Type.ResolveStrat,
comptime strat: Type.ResolveStrat,
) Zcu.SemaError!InternPool.Alignment {
const ip = &pt.zcu.intern_pool;
assert(loaded_union.flagsUnordered(ip).layout != .@"packed");
@@ -3191,7 +3191,7 @@ pub fn structFieldAlignmentAdvanced(
explicit_alignment: InternPool.Alignment,
field_ty: Type,
layout: std.builtin.Type.ContainerLayout,
strat: Type.ResolveStrat,
comptime strat: Type.ResolveStrat,
) Zcu.SemaError!InternPool.Alignment {
assert(layout != .@"packed");
if (explicit_alignment != .none) return explicit_alignment;