aboutsummaryrefslogtreecommitdiff
path: root/doc/langref.html.in
AgeCommit message (Collapse)Author
2025-10-26docs: fix handle_error_with_catch_block typoFelipe Cardozo
2025-10-17langref: Bump 0.15.1 to 0.15.2Ryan Liptak
2025-09-17langref: mention union support of `@fieldParentPtr`rohlem
2025-09-07frontend: vectors and arrays no longer support in-memory coercionAndrew Kelley
closes #25172
2025-09-06Merge pull request #25163 from ziglang/packed-union-unusedAndrew Kelley
forbid unused bits in packed unions
2025-09-06langref: update "Choosing an Allocator" sectionAndrew Kelley
and delete "Implementing an Allocator" section because it is out of scope.
2025-09-05langref: update for new packed union rulesAndrew Kelley
2025-08-21langref: update nav linkAndrew Kelley
2025-08-21langref: sync with zig-spec grammar.pegIsaac Freund
2025-08-18Release 0.15.00.15.0Andrew Kelley
2025-08-17langref: add documentation for unions with inferred tag and explicit tag valuesJustus Klausecker
2025-08-12Sema: Improve comptime arithmetic undef handlingJustus Klausecker
This commit expands on the foundations laid by https://github.com/ziglang/zig/pull/23177 and moves even more `Sema`-only functionality from `Value` to `Sema.arith`. Specifically all shift and bitwise operations, `@truncate`, `@bitReverse` and `@byteSwap` have been moved and adapted to the new rules around `undefined`. Especially the comptime shift operations have been basically rewritten, fixing many open issues in the process. New rules applied to operators: * `<<`, `@shlExact`, `@shlWithOverflow`, `>>`, `@shrExact`: compile error if any operand is undef * `<<|`, `~`, `^`, `@truncate`, `@bitReverse`, `@byteSwap`: return undef if any operand is undef * `&`, `|`: Return undef if both operands are undef, turn undef into actual `0xAA` bytes otherwise Additionally this commit canonicalizes the representation of aggregates with all-undefined members in the `InternPool` by disallowing them and enforcing the usage of a single typed `undef` value instead. This reduces the amount of edge cases and fixes a bunch of bugs related to partially undefined vecs. List of operations directly affected by this patch: * `<<`, `<<|`, `@shlExact`, `@shlWithOverflow` * `>>`, `@shrExact` * `&`, `|`, `~`, `^` and their atomic rmw + reduce pendants * `@truncate`, `@bitReverse`, `@byteSwap`
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-07-31langref: improve `@import` documentationmlugg
Rewrite to be more clear and correct. Also, explain ZON imports. Resolves: #23314
2025-07-31Merge pull request #24537 from IOKG04/some-documentation-updates-0Matthew Lugg
some small langref changes
2025-07-30langref: clarify allowed atomic typesKendall Condon
Floats are not allowed in @cmpxchg Packed structs are allowed for all atomic builtins
2025-07-28`.strong`, not `.Strong`IOKG04
https://github.com/ziglang/zig/pull/24537#issuecomment-3124556900
2025-07-22`@rem()` and `@mod()` take `denominator != 0`, not just `denominator > 0`IOKG04
https://github.com/ziglang/zig/issues/23635 I also added tests for `@rem()` with `denominator < 0` cause there were none before I hope I added them in the correct place, if not I can change it ofc
2025-07-22error return traces are *not* enabled for ReleaseSafeIOKG04
https://github.com/ziglang/zig/issues/24232
2025-07-20langref: upgrade grammar.y for asm clobber changeKendall Condon
2025-07-07update standalone and incremental tests to new APIAndrew Kelley
2025-07-07remove `usingnamespace` from the languageAndrew Kelley
closes #20663
2025-07-07remove `async` and `await` keywordsAndrew Kelley
Also remove `@frameSize`, closing #3654. While the other machinery might remain depending on #23446, it is settled that there will not be `async`/ `await` keywords in the language.
2025-06-12Allow more operators on bool vectors (#24131)Daniel Kongsgaard
* Sema: allow binary operations and boolean not on vectors of bool * langref: Clarify use of operators on vectors (`and` and `or` not allowed) closes #24093
2025-06-07langref: undefined _is_ materialized in all safe modes (#24107)Alex Kladov
* trailing whitespace * langref: undefined _is_ materialized in all safe modes I am also not super happy about the clause that immediately follows. I _believe_ what we want to say here is that, simultaneously: * undefined is guaranteed to be matrerialized in in all safe modes. A Zig implementation that elides `ptr.* = undefined` in ReleaseSafe mode would be a non-conforming implementation. * A Zig program that relies on undefined being materialized is buggy. But I don't think it's the time to engage this level of language-lawering!
2025-05-23langref: update nav link for 0.14.1Andrew Kelley
2025-04-26langref: document @memmovedweiller
2025-04-15langref: reword some packed struct text and exampleAndrew Kelley
2025-04-15langref: packed struct documentationkj4tmp@gmail.com
2025-03-27std.meta.FieldType -> @FieldTypeАндрей Краевский
2025-03-06langref: update splat sectionKiëd Llaentenn
2025-03-04Release 0.14.00.14.0Andrew Kelley
2025-02-28Revert "Merge pull request #22898 from kristoff-it/deprecated-proposal"Andrew Kelley
This reverts commit dea72d15da4fba909dc3ccb2e9dc5286372ac023, reversing changes made to ab381933c87bcc744058d25a876cfdc0d23fc674. The changeset does not work as advertised and does not have sufficient test coverage. Reopens #22822
2025-02-26langref: update deprecated sectionAndrew Kelley
2025-02-26langref: fix whitespaceAndrew Kelley
2025-02-26`@deprecated`: add suggested changes to langref entryLoris Cro
2025-02-26`@deprecated`: add langref entryLoris Cro
2025-02-22langref: document modules, root source files, etcmlugg
2025-02-22langref: embrace the term "illegal behavior"mlugg
Also standardise the terms "safety-checked" and "unchecked".
2025-02-22langref: improve description of `@fieldParentPtr`mlugg
2025-02-07langref/errorset: Replace subset description with unionFrank Plowman
The previous language using subsets was really just stating a couple of the properties of the union of a group of sets, and with a minor error at that.
2025-01-29langref: clarify restricted `@memcpy` semanticsmlugg
2025-01-28langref: Document destructuring (#21627)87
2025-01-26langref: fixes incorrect description of cmpxchg functionsisaac yonemoto
2025-01-26link to Tuples section in Hello World docs, and give an example of an empty ↵bsubei
tuple
2025-01-26langref: correct return type of comptime known bitcount opsrpkak
2025-01-26fix typo in @typeName langrefkj4tmp@gmail.com
2025-01-26Add `zig std` to langref.html (#22360)ExeVirus
2024-12-30langref: move pointer casting section out of volatile subsectionAndrew Kelley
2024-11-26revert langref section "common errdefer slip ups"Andrew Kelley
This does not belong in the language reference. reverts 91a88a789ffa80ebb57c77ae0fe37594276e3707