diff --git a/src/glossary.md b/src/glossary.md index b5074767c..0ce4272c6 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -1,5 +1,34 @@ # Glossary +## Terms used in the Specification + +### Ill-formed program + +r[requirement.error] + +A Rust program is ill-formed if it violates a static constraint of the language. +Unless otherwise stated (See ["no diagnostic required"][requirement.ndr]), it is an error to have an ill-formed program. + +#### No diagnostic required + +r[requirement.ndr] + +When No diagnostic is required for a static constraint, the implementation may (but is not required to) issue an compile-time error or other diagnostic, and may translate the program. + +If such a program is succesfully translated, no constraints are placed on the result of executing the program. + +> [!NOTE] +> The constraint which is modified by the phrase "No Diagnostic Required" may be defined implicitly, such as with the term "shall", rather than explicitly stating that the program is ill-formed. + +> [!NOTE] +> Such constraints are used only when it may be unreasonable or impossible to check the constraints statically, and where the result of violating the constraints makes it impossible to ensure the required behaviour of the program + +### Shall + +The word "shall" is a static constraint placed upon the program. A program that violates a constraint that uses "shall" is ill-formed. + +## Rust Specific Terms + ### Abstract syntax tree An ‘abstract syntax tree’, or ‘AST’, is an intermediate representation of @@ -105,6 +134,7 @@ are also considered local. Fundamental type constructors cannot [cover](#uncover Any time the term "covered type" is used, the `T` in `&T`, `&mut T`, `Box`, and `Pin` is not considered covered. + ### Inhabited A type is inhabited if it has constructors and therefore can be instantiated. An inhabited type is