Skip to content

Commit 65852a4

Browse files
authored
AdtDef is an algebraic data type, not abstract data type
1 parent 87b0c90 commit 65852a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc/ty/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,11 @@ pub struct FieldDef {
19381938
pub vis: Visibility,
19391939
}
19401940

1941-
/// The definition of an abstract data type -- a struct or enum.
1941+
/// The definition of an [*algebraic data type (ADT)*][adt].
1942+
/// These include `struct`s (products), `enum` (sums).
1943+
/// A `union` is also represented here but is not an ADT.
1944+
///
1945+
/// [adt]: https://en.wikipedia.org/wiki/Algebraic_data_type
19421946
///
19431947
/// These are all interned (by `intern_adt_def`) into the `adt_defs` table.
19441948
pub struct AdtDef {

0 commit comments

Comments
 (0)