Comments (1)
How about (note the else
):
struct Point {
x: u64,
y: u64,
}
enum Foo {
One: i32,
Two: Point,
Three: void,
}
fn f(foo: Foo) -> void {
switch (foo) {
One(x) {
},
Two(*point) {
// same as the `*` in the for loop. now point is a pointer to the struct value
},
Three {
},
} else {
// `default` in C
// `_ =>` in rust
}
}
from zig.
Related Issues (20)
- Proposal: Add an optional scope to atomic builtins
- Step.Run.setCwd error message is confusing
- `tools/generate_linux_syscalls.zig` could be cleaned up to be table-driven HOT 7
- write fuzz inputs to a shared memory region before running a task
- enhance the fuzzing algorithm to be competitive with other mainstream fuzzers HOT 2
- zig build from source error in MacOS HOT 2
- Setting bad array sentinel not detected HOT 2
- invalid clockid default in std.os.linux HOT 3
- add a UI to fuzzing to report progress, code coverage, interesting inputs, and other stats
- `std.testing.fuzzInput`: introduce a corpus option
- `std.testing.fuzzInput`: ability to choose whether timing out is considered a fail or a pass
- `std.testing.fuzzInput`: introduce a length range option
- Missing RPATH entries HOT 2
- Proposal: Adding interfaces to the language HOT 2
- Linux: inconsistent return types of `std.os.linux.inotify*` HOT 4
- Missing `note: called from here` for compile error on invalid struct field type HOT 1
- compiler crashes on `@tagName` of `undefined` enum literal value HOT 1
- translate-c: Function-local extern variable is missing namespace qualifier HOT 1
- Rework `std.sort` HOT 1
- cgo cross compile linker error with openssl on windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zig.