Skip to content

Replace deprecated default initializations with decl literals - #21287

Merged
mlugg merged 2 commits into
ziglang:masterfrom
linusg:deprecated-default-init
Sep 12, 2024
Merged

Replace deprecated default initializations with decl literals#21287
mlugg merged 2 commits into
ziglang:masterfrom
linusg:deprecated-default-init

Conversation

@linusg

Copy link
Copy Markdown
Collaborator

Follow-up to 0b9fccf.

@linusg

Copy link
Copy Markdown
CollaboratorAuthor

ah, I suppose this needs a zig1.wasm update to work...

@mlugg

mlugg commented Sep 2, 2024

Copy link
Copy Markdown
Member

Yep, that's why I held off on doing it in that PR. However, this work is still valuable, so keep it around! Once we've done a zig1.wasm update we can merge this.

By the way, I haven't looked over all of the changes here, but InternPool shouldn't use default values at all -- instead, it should probably expose a pub const empty: InternPool = .... That's because many of the field values are tied together.

@linusg
linusg marked this pull request as draft September 2, 2024 23:29
@mlugg

Copy link
Copy Markdown
Member

@linusg#21367 contained a zig1.wasm update, so you should be good to go ahead with this branch now if you rebase!

@linusg

Copy link
Copy Markdown
CollaboratorAuthor

Rebased, did a quick sweep of newly added = .{}, added InternPool.empty in a separate commit.

@linusg
linusg marked this pull request as ready for review September 11, 2024 21:54
@mlugg
mlugg enabled auto-merge September 12, 2024 17:59
@mlugg
mlugg merged commit 0001f91 into ziglang:masterSep 12, 2024
@linusg
linusg deleted the deprecated-default-init branch September 12, 2024 18:56
DivergentClouds pushed a commit to DivergentClouds/zig that referenced this pull request Sep 24, 2024
Replace deprecated default initializations with decl literals
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@linusg@mlugg