Skip to content

std: move errno to become an nonexhaustive enum#9613

Merged
andrewrk merged 1 commit into
masterfrom
os-bits-errno
Aug 24, 2021
Merged

std: move errno to become an nonexhaustive enum#9613
andrewrk merged 1 commit into
masterfrom
os-bits-errno

Conversation

@andrewrk

Copy link
Copy Markdown
Member

The primary purpose of this change is to eliminate one usage of
usingnamespace in the standard library - specifically the usage for
errno values in std.os.linux.

This is accomplished by truncating the E prefix from error values, and
making errno a proper enum.

A similar strategy can be used to eliminate some other usingnamespace
sites in the std lib.

The primary purpose of this change is to eliminate one usage of
`usingnamespace` in the standard library - specifically the usage for
errno values in `std.os.linux`.

This is accomplished by truncating the `E` prefix from error values, and
making errno a proper enum.

A similar strategy can be used to eliminate some other `usingnamespace`
sites in the std lib.
@andrewrk andrewrk added breaking Implementing this issue could cause existing code to no longer compile or have different behavior. standard library This issue involves writing Zig code for the standard library. labels Aug 24, 2021
@daurnimator

Copy link
Copy Markdown
Contributor

See also #4233

@andrewrk andrewrk merged commit a98fa56 into master Aug 24, 2021
@andrewrk andrewrk deleted the os-bits-errno branch August 24, 2021 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Implementing this issue could cause existing code to no longer compile or have different behavior. standard library This issue involves writing Zig code for the standard library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants