Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add identifier syntax to type-layout.md #1614

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

chorman0773
Copy link
Contributor

No description provided.

src/type-layout.md Outdated Show resolved Hide resolved
src/type-layout.md Outdated Show resolved Hide resolved
Primitive representations can only be applied to enumerations and have
different behavior whether the enum has fields or no fields. It is an error
for [zero-variant enums] to have a primitive representation. Combining
two primitive representations together is an error.

#### Primitive Representation of Field-less Enums

r[layout.repr.primitive.enum]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout the changes here it seems to be inconsistent about whether or not a blank line is added after the rule.

I would say the predominate style seems to not include blank lines. Can we stay consistent and avoid those extra blank lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blank line here is because it's a section rule-id not a paragraph rule-id. There's no paragraph rule-id because the current text would only have an intro paragraph. This style (blank line after rules for sections, and omitting a lone .intro id) has been common throughout the PRs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the section rule-id go above the main header?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we could probably deal with this in a subsequent round of formatting and reorganization too, maybe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm still not sure I agree with this, since the paragraph below does not look like an introduction to me. It seems to define the specific layout of these types of enums. I'm not going to block here, but I have opened #1651 to further discuss how these things interact.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss added this pull request to the merge queue Oct 12, 2024
Merged via the queue into rust-lang:master with commit 7ce3563 Oct 12, 2024
4 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 24, 2024
Update books

## rust-lang/edition-guide

7 commits in c7ebae25cb4801a31b6f05353f6d85bfa6feedd1..1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a9
2024-10-21 14:29:49 UTC to 2024-10-19 19:08:20 UTC

- 2024: Add reserved syntax (rust-lang/edition-guide#326)
- Update stdout of `cargo new` (rust-lang/edition-guide#327)
- Don't run doctests on rustfmt ident sorting page
- add rustfmt raw identifer sorting doc (rust-lang/edition-guide#321)
- Add some tips for what to be careful of with rustdoc-doctests (rust-lang/edition-guide#323)
- Remove cargo-remove-implicit-features (rust-lang/edition-guide#324)
- Rename doctest standalone tag (rust-lang/edition-guide#325)

## rust-embedded/book

1 commits in f40a8b420ec4b4505d9489965e261f1d5c28ba23..ddbf1b4e2858fedb71b7c42eb15c4576517dc125
2024-10-13 19:53:37 UTC to 2024-10-13 19:53:37 UTC

- Add link to Cortex-M comparison to install.md (rust-embedded/book#378)

## rust-lang/reference

29 commits in c64e52a3d306eac0129f3ad6c6d8806ab99ae2e9..23ce619966541bf2c80d45fdfeecf3393e360a13
2024-10-05 00:33:03 +0000 to 2024-10-22 21:34:51 +0000
- Mention `--print cfg` under set configuration options (rust-lang/reference#1636)
- Fix `pat` fragment specifier to be the "current" edition (rust-lang/reference#1640)
- Add restriction for cfg_attr with crate_type and crate_name (rust-lang/reference#1649)
- Sort macro fragment specifiers (rust-lang/reference#1641)
- Document mixed-site hygiene (rust-lang/reference#1656)
- Clarify that "macro attributes" refers to proc macros (rust-lang/reference#1660)
- mdbook-spec: Fix Spec::new creation (rust-lang/reference#1658)
- Fix stdcall example broken by recent rustc change (rust-lang/reference#1659)
- Add spec identifiers to const_eval.md (rust-lang/reference#1569)
- Add identifier syntax to trait-bounds.md (rust-lang/reference#1631)
- Add identifier syntax to macro-ambiguity.md (rust-lang/reference#1634)
- Add spec identifier syntax to conditional-compilation.md (rust-lang/reference#1564)
- Add spec identifiers to behaviour-considered-undefined.md (rust-lang/reference#1562)
- Add test linking (rust-lang/reference#1646)
- Allow `deny` inside `forbid` as a no-op (rust-lang/reference#1655)
- Add identifier syntax to identifiers.md (rust-lang/reference#1583)
- Add spec identifiers to crates-and-source-files.md (rust-lang/reference#1570)
- Add identifier syntax to linkage.md (rust-lang/reference#1633)
- Add identifier syntax to type-coercions.md (rust-lang/reference#1632)
- Add identifiers to variables.md (rust-lang/reference#1626)
- Add identifier syntax to lexer chapters (rust-lang/reference#1620)
- Add spec identifier syntax to `unsafe-keyword.md` and `unsafety.md` (rust-lang/reference#1619)
- Add identifier syntax to types and subchapters. (rust-lang/reference#1618)
- Add identifier syntax to subtyping.md (rust-lang/reference#1613)
- Add identifier syntax to statements.md (rust-lang/reference#1611)
- Add identifier syntax to type-layout.md (rust-lang/reference#1614)
- Clarify definition of "immutable bytes" (rust-lang/reference#1637)
- Add preview artifacts in CI (rust-lang/reference#1647)
- trait bounds grammar: make `?` and `for<>` mutually exclusive (rust-lang/reference#1650)

## rust-lang/rustc-dev-guide

5 commits in 07bc9ca9eb1cd6d9fbbf758c2753b748804a134f..59d94ea75a0b157e148af14c73c2dd60efb7b60a
2024-10-21 02:30:07 UTC to 2024-10-07 21:12:09 UTC

- Add the WASM | WASI | Emscripten notification groups (rust-lang/rustc-dev-guide#2100)
- Update bootstrapping.md (rust-lang/rustc-dev-guide#1900)
- Rename `needs-profiler-support` to `needs-profiler-runtime` (rust-lang/rustc-dev-guide#2095)
- Document compiletest directives `ignore-coverage-map` and `ignore-coverage-run` (rust-lang/rustc-dev-guide#2094)
- Purge `run-pass-valgrind` mentions (rust-lang/rustc-dev-guide#2091)
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Oct 29, 2024
Update books

## rust-lang/edition-guide

7 commits in c7ebae25cb4801a31b6f05353f6d85bfa6feedd1..1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a9
2024-10-21 14:29:49 UTC to 2024-10-19 19:08:20 UTC

- 2024: Add reserved syntax (rust-lang/edition-guide#326)
- Update stdout of `cargo new` (rust-lang/edition-guide#327)
- Don't run doctests on rustfmt ident sorting page
- add rustfmt raw identifer sorting doc (rust-lang/edition-guide#321)
- Add some tips for what to be careful of with rustdoc-doctests (rust-lang/edition-guide#323)
- Remove cargo-remove-implicit-features (rust-lang/edition-guide#324)
- Rename doctest standalone tag (rust-lang/edition-guide#325)

## rust-embedded/book

1 commits in f40a8b420ec4b4505d9489965e261f1d5c28ba23..ddbf1b4e2858fedb71b7c42eb15c4576517dc125
2024-10-13 19:53:37 UTC to 2024-10-13 19:53:37 UTC

- Add link to Cortex-M comparison to install.md (rust-embedded/book#378)

## rust-lang/reference

29 commits in c64e52a3d306eac0129f3ad6c6d8806ab99ae2e9..23ce619966541bf2c80d45fdfeecf3393e360a13
2024-10-05 00:33:03 +0000 to 2024-10-22 21:34:51 +0000
- Mention `--print cfg` under set configuration options (rust-lang/reference#1636)
- Fix `pat` fragment specifier to be the "current" edition (rust-lang/reference#1640)
- Add restriction for cfg_attr with crate_type and crate_name (rust-lang/reference#1649)
- Sort macro fragment specifiers (rust-lang/reference#1641)
- Document mixed-site hygiene (rust-lang/reference#1656)
- Clarify that "macro attributes" refers to proc macros (rust-lang/reference#1660)
- mdbook-spec: Fix Spec::new creation (rust-lang/reference#1658)
- Fix stdcall example broken by recent rustc change (rust-lang/reference#1659)
- Add spec identifiers to const_eval.md (rust-lang/reference#1569)
- Add identifier syntax to trait-bounds.md (rust-lang/reference#1631)
- Add identifier syntax to macro-ambiguity.md (rust-lang/reference#1634)
- Add spec identifier syntax to conditional-compilation.md (rust-lang/reference#1564)
- Add spec identifiers to behaviour-considered-undefined.md (rust-lang/reference#1562)
- Add test linking (rust-lang/reference#1646)
- Allow `deny` inside `forbid` as a no-op (rust-lang/reference#1655)
- Add identifier syntax to identifiers.md (rust-lang/reference#1583)
- Add spec identifiers to crates-and-source-files.md (rust-lang/reference#1570)
- Add identifier syntax to linkage.md (rust-lang/reference#1633)
- Add identifier syntax to type-coercions.md (rust-lang/reference#1632)
- Add identifiers to variables.md (rust-lang/reference#1626)
- Add identifier syntax to lexer chapters (rust-lang/reference#1620)
- Add spec identifier syntax to `unsafe-keyword.md` and `unsafety.md` (rust-lang/reference#1619)
- Add identifier syntax to types and subchapters. (rust-lang/reference#1618)
- Add identifier syntax to subtyping.md (rust-lang/reference#1613)
- Add identifier syntax to statements.md (rust-lang/reference#1611)
- Add identifier syntax to type-layout.md (rust-lang/reference#1614)
- Clarify definition of "immutable bytes" (rust-lang/reference#1637)
- Add preview artifacts in CI (rust-lang/reference#1647)
- trait bounds grammar: make `?` and `for<>` mutually exclusive (rust-lang/reference#1650)

## rust-lang/rustc-dev-guide

5 commits in 07bc9ca9eb1cd6d9fbbf758c2753b748804a134f..59d94ea75a0b157e148af14c73c2dd60efb7b60a
2024-10-21 02:30:07 UTC to 2024-10-07 21:12:09 UTC

- Add the WASM | WASI | Emscripten notification groups (rust-lang/rustc-dev-guide#2100)
- Update bootstrapping.md (rust-lang/rustc-dev-guide#1900)
- Rename `needs-profiler-support` to `needs-profiler-runtime` (rust-lang/rustc-dev-guide#2095)
- Document compiletest directives `ignore-coverage-map` and `ignore-coverage-run` (rust-lang/rustc-dev-guide#2094)
- Purge `run-pass-valgrind` mentions (rust-lang/rustc-dev-guide#2091)
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Oct 30, 2024
Update books

## rust-lang/edition-guide

7 commits in c7ebae25cb4801a31b6f05353f6d85bfa6feedd1..1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a9
2024-10-21 14:29:49 UTC to 2024-10-19 19:08:20 UTC

- 2024: Add reserved syntax (rust-lang/edition-guide#326)
- Update stdout of `cargo new` (rust-lang/edition-guide#327)
- Don't run doctests on rustfmt ident sorting page
- add rustfmt raw identifer sorting doc (rust-lang/edition-guide#321)
- Add some tips for what to be careful of with rustdoc-doctests (rust-lang/edition-guide#323)
- Remove cargo-remove-implicit-features (rust-lang/edition-guide#324)
- Rename doctest standalone tag (rust-lang/edition-guide#325)

## rust-embedded/book

1 commits in f40a8b420ec4b4505d9489965e261f1d5c28ba23..ddbf1b4e2858fedb71b7c42eb15c4576517dc125
2024-10-13 19:53:37 UTC to 2024-10-13 19:53:37 UTC

- Add link to Cortex-M comparison to install.md (rust-embedded/book#378)

## rust-lang/reference

29 commits in c64e52a3d306eac0129f3ad6c6d8806ab99ae2e9..23ce619966541bf2c80d45fdfeecf3393e360a13
2024-10-05 00:33:03 +0000 to 2024-10-22 21:34:51 +0000
- Mention `--print cfg` under set configuration options (rust-lang/reference#1636)
- Fix `pat` fragment specifier to be the "current" edition (rust-lang/reference#1640)
- Add restriction for cfg_attr with crate_type and crate_name (rust-lang/reference#1649)
- Sort macro fragment specifiers (rust-lang/reference#1641)
- Document mixed-site hygiene (rust-lang/reference#1656)
- Clarify that "macro attributes" refers to proc macros (rust-lang/reference#1660)
- mdbook-spec: Fix Spec::new creation (rust-lang/reference#1658)
- Fix stdcall example broken by recent rustc change (rust-lang/reference#1659)
- Add spec identifiers to const_eval.md (rust-lang/reference#1569)
- Add identifier syntax to trait-bounds.md (rust-lang/reference#1631)
- Add identifier syntax to macro-ambiguity.md (rust-lang/reference#1634)
- Add spec identifier syntax to conditional-compilation.md (rust-lang/reference#1564)
- Add spec identifiers to behaviour-considered-undefined.md (rust-lang/reference#1562)
- Add test linking (rust-lang/reference#1646)
- Allow `deny` inside `forbid` as a no-op (rust-lang/reference#1655)
- Add identifier syntax to identifiers.md (rust-lang/reference#1583)
- Add spec identifiers to crates-and-source-files.md (rust-lang/reference#1570)
- Add identifier syntax to linkage.md (rust-lang/reference#1633)
- Add identifier syntax to type-coercions.md (rust-lang/reference#1632)
- Add identifiers to variables.md (rust-lang/reference#1626)
- Add identifier syntax to lexer chapters (rust-lang/reference#1620)
- Add spec identifier syntax to `unsafe-keyword.md` and `unsafety.md` (rust-lang/reference#1619)
- Add identifier syntax to types and subchapters. (rust-lang/reference#1618)
- Add identifier syntax to subtyping.md (rust-lang/reference#1613)
- Add identifier syntax to statements.md (rust-lang/reference#1611)
- Add identifier syntax to type-layout.md (rust-lang/reference#1614)
- Clarify definition of "immutable bytes" (rust-lang/reference#1637)
- Add preview artifacts in CI (rust-lang/reference#1647)
- trait bounds grammar: make `?` and `for<>` mutually exclusive (rust-lang/reference#1650)

## rust-lang/rustc-dev-guide

5 commits in 07bc9ca9eb1cd6d9fbbf758c2753b748804a134f..59d94ea75a0b157e148af14c73c2dd60efb7b60a
2024-10-21 02:30:07 UTC to 2024-10-07 21:12:09 UTC

- Add the WASM | WASI | Emscripten notification groups (rust-lang/rustc-dev-guide#2100)
- Update bootstrapping.md (rust-lang/rustc-dev-guide#1900)
- Rename `needs-profiler-support` to `needs-profiler-runtime` (rust-lang/rustc-dev-guide#2095)
- Document compiletest directives `ignore-coverage-map` and `ignore-coverage-run` (rust-lang/rustc-dev-guide#2094)
- Purge `run-pass-valgrind` mentions (rust-lang/rustc-dev-guide#2091)
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