Skip to content

Commit

Permalink
Rollup merge of rust-lang#64357 - rust-lang:adt-docs-fix, r=varkor
Browse files Browse the repository at this point in the history
`AdtDef` is an algebraic data type, not abstract data type

r? @varkor
  • Loading branch information
Centril committed Sep 16, 2019
2 parents 1eed627 + 2fd4e58 commit 881a0b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/librustc/ty/mod.rs
Expand Up @@ -1938,9 +1938,15 @@ pub struct FieldDef {
pub vis: Visibility,
}

/// The definition of an abstract data type -- a struct or enum.
/// The definition of a user-defined type, e.g., a `struct`, `enum`, or `union`.
///
/// These are all interned (by `intern_adt_def`) into the `adt_defs` table.
///
/// The initialism *"Adt"* stands for an [*algebraic data type (ADT)*][adt].
/// This is slightly wrong because `union`s are not ADTs.
/// Moreover, Rust only allows recursive data types through indirection.
///
/// [adt]: https://en.wikipedia.org/wiki/Algebraic_data_type
pub struct AdtDef {
/// `DefId` of the struct, enum or union item.
pub did: DefId,
Expand Down

0 comments on commit 881a0b7

Please sign in to comment.