diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-05-27 20:17:27 +0200 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2020-05-27 15:17:33 -0500 |
| commit | 077a5a73cfcab95df6cf2ced59fc5fa877cf9d16 (patch) | |
| tree | 30daf1a1bbf067c1abc25aad9c492d887acd0271 /src/doc/rustc-dev-guide | |
| parent | fbae21f75644f10490fbf73edbb150d6a5db0912 (diff) | |
| download | rust-077a5a73cfcab95df6cf2ced59fc5fa877cf9d16.tar.gz rust-077a5a73cfcab95df6cf2ced59fc5fa877cf9d16.zip | |
Apply suggestions from code review
Co-authored-by: Who? Me?! <mark-i-m@users.noreply.github.com>
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/appendix/glossary.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/appendix/glossary.md b/src/doc/rustc-dev-guide/src/appendix/glossary.md index 6f770a77731..dddf628f277 100644 --- a/src/doc/rustc-dev-guide/src/appendix/glossary.md +++ b/src/doc/rustc-dev-guide/src/appendix/glossary.md @@ -47,7 +47,7 @@ miri <div id="miri"/> | An interpreter for MIR used for cons monomorphization <div id="mono"/> | The process of taking generic implementations of types and functions and instantiating them with concrete types. For example, in the code we might have `Vec<T>`, but in the final executable, we will have a copy of the `Vec` code for every concrete type used in the program (e.g. a copy for `Vec<usize>`, a copy for `Vec<MyStruct>`, etc). normalize <div id="normalize"/> | A general term for converting to a more canonical form, but in the case of rustc typically refers to [associated type normalization](../traits/goals-and-clauses.html#normalizeprojection---type). newtype <div id="newtype"/> | A wrapper around some other type (e.g., `struct Foo(T)` is a "newtype" for `T`). This is commonly used in Rust to give a stronger type for indices. -Niche | Invalid bit patterns for a type *that can be used* for layout optimizations. Some types, like the `NonZero*` integers or the reference `&T` are invalid for certain bit patterns, in these cases a 0 bitstring. This means the compiler can perform layout optimizations by taking advantage of the invalid "niche value". An example application for this is the [*Discriminant elision on `Option`-like enums*](https://rust-lang.github.io/unsafe-code-guidelines/layout/enums.html#discriminant-elision-on-option-like-enums), which allows using a type's niche to determine the `enum` variant without storing a discriminant. +Niche | Invalid bit patterns for a type *that can be used* for layout optimizations. Some types cannot have certain bit patterns. For example, the `NonZero*` integers or the reference `&T` cannot be represented by a 0 bitstring. This means the compiler can perform layout optimizations by taking advantage of the invalid "niche value". An example application for this is the [*Discriminant elision on `Option`-like enums*](https://rust-lang.github.io/unsafe-code-guidelines/layout/enums.html#discriminant-elision-on-option-like-enums), which allows using a type's niche to determine the `enum` variant without storing a discriminant. NLL <div id="nll"/> | Short for [non-lexical lifetimes](../borrow_check/region_inference.html), this is an extension to Rust's borrowing system to make it be based on the control-flow graph. node-id or NodeId <div id="node-id"/> | An index identifying a particular node in the AST or HIR; gradually being phased out and replaced with `HirId`. See [the HIR chapter for more](../hir.html#identifiers-in-the-hir). obligation <div id="obligation"/> | Something that must be proven by the trait system. ([see more](../traits/resolution.html)) |
