Skip to content

Guarantee that the never type ! is zero-sized and 1-aligned.#2309

Draft
zachs18 wants to merge 8 commits into
rust-lang:masterfrom
zachs18:never-1zst
Draft

Guarantee that the never type ! is zero-sized and 1-aligned.#2309
zachs18 wants to merge 8 commits into
rust-lang:masterfrom
zachs18:never-1zst

Conversation

@zachs18

@zachs18 zachs18 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Built on top of #2283; only the last commit is from this PR.

Marked as draft, will rebase when #2283 merges when ! stabilizes.

Will need T-lang FCP.

traviscross and others added 7 commits June 23, 2026 19:32
Stabilizing the never type means making `!` available in all positions
and changing the never-to-any coercion fallback type to `!` in older
editions.  Let's make the updates needed for that.
In various places, we had worked around the never type being unstable
when writing examples.  Now that it is stable, let's clean those
examples up.
This moves type.never.intro to the top of the chapter to match the style
where the intro should always come first in a section.
This moves the never example to the intro to match our layout style, and
adds an example showing a type expression using `!`.
Never can coerce to itself.
This tries to punch up the never type intro by linking to the divergence
chapter.
Sign up for free to 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.

3 participants