Repository navigation
Fix the glossary definition of codegen - #3065
Closed
isHeSatoshi wants to merge 1 commit into
Closed
isHeSatoshi wants to merge 1 commit into
isHeSatoshi wants to merge 1 commit into
Conversation
Collaborator
|
Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using |
This comment was marked as low quality.
This comment was marked as low quality.
fmease
reviewed
Oct 19, 2026
| <span id="tls">[TLS]</span> | _Thread-local storage_. Variables may be defined so that each thread has its own copy (rather than all threads sharing the variable). This has some interactions with LLVM. Not all platforms support TLS. | ||
| <span id="trait-ref">trait reference, trait ref </span> | The name of a trait along with a suitable list of generic arguments. ([see more](../traits/goals-and-clauses.md#trait-ref)) | ||
| <span id="trans">trans 👎</span> | Short for _translation_, the code to translate MIR into LLVM IR. **Renamed to** [codegen](#codegen). | ||
| <span id="trans">trans 👎</span> | Short for _translation_, the old name for [codegen](#codegen). **Renamed to** [codegen](#codegen). |
Member
There was a problem hiding this comment.
The following sentence already states that the term trans was "renamed" (replaced) with "codegen", so one of the two clauses is redundant.
This comment was marked as low quality.
This comment was marked as low quality.
Sorry, something went wrong.
The glossary said codegen is "the code to translate MIR into LLVM IR", which
describes rustc's own work rather than what codegen is: rustc does not implement
code generation, it hands that to LLVM or to another backend.
The codegen chapter already puts it the other way round ("the part of the
compiler that actually generates an executable binary ... rustc doesn't
implement codegen itself ... there are no hard boundaries"), so the glossary now
agrees with it and links there.
The `trans` entry repeated the same wording. It now follows the shape of the
`LTA` entry instead: the expansion of the abbreviation, then the term it was
renamed to, without restating the rename twice.
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 defined codegen as "the code to translate MIR into LLVM IR", and the
transentry repeated that wording. That describes the input to codegen rather than codegen itself, and it reads as if rustc emitted LLVM IR as its final step.The [codegen chapter] already says it the other way round:
So the glossary entry now matches the chapter, keeps the point that the boundary is not sharp (the reason the old wording was half right), and links to the chapter. The
transentry no longer repeats the definition; it just points atcodegen.Verified: the link target
../backend/codegen.mdresolves, and the anchor#codegenis unchanged, so existing links to it keep working.Fixes #637.