Repository navigation
Add a glossary entry for target - #2388
Open
isHeSatoshi wants to merge 1 commit into
Open
isHeSatoshi wants to merge 1 commit into
isHeSatoshi wants to merge 1 commit into
Conversation
The term *target* is used throughout the reference, including in the glossary
itself ("target platform"), but it was never defined.
Add an entry that says what a target is, points out the properties the language
defines in terms of it, and repeats the authoring guideline that the reference
does not document which targets exist or the properties of a particular target.
DanielEScherzer
suggested changes
Oct 19, 2026
|
|
||
| Several parts of the language are defined in terms of the target rather than in absolute terms, such as the size of `usize`, or the values of the `target_*` [conditional compilation] keys. The reference documents those properties as properties of the target, but it does not document which targets exist, nor the properties of any particular target. | ||
|
|
||
| [conditional compilation]: conditional-compilation.md |
Contributor
There was a problem hiding this comment.
please put this at the bottom of the file with the other link definitions
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The glossary is where the reference defines its terms, and target was missing even though the glossary itself uses it ("the size can change depending on compiler version ... and target platform") and many pages are written in terms of it (
usizesize, thetarget_*conditional-compilation keys,#[repr(C)]layout).The entry defines the term, gives the usual target-triple form as the identifier, and links to conditional compilation for the
target_*keys. It also repeats the guideline from the authoring guide so the entry does not invite a list of targets into the reference: the reference documents that target properties exist, not which targets exist or what their properties are.Note for reviewers: I kept this to the glossary rather than adding a new chapter, since the term is only ever used as a qualifier for other rules. If you would rather the definition live next to the conditional-compilation chapter, say so and I will move it.
Verification:
cargo run --package=style-check -- src→passed!.Fixes #2089.