Rollup merge of #64357 - rust-lang:adt-docs-fix, r=varkor

`AdtDef` is an algebraic data type, not abstract data type

r? @varkor
This commit is contained in:
Mazdak Farrokhzad 2019-09-16 23:21:48 +02:00 committed by GitHub
commit 88e501e768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,