From b7832d785629e5235b67f05604163b017ee49535 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 10 Nov 2023 15:15:32 +0100 Subject: [PATCH] Update glossary.md (#1455) Expand a few random entries of the glossary. This is just to remind people that the glossary exists and that we should work on making it complete. Part of #1466. --- src/glossary.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/glossary.md b/src/glossary.md index 6502e275..08b822de 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -65,7 +65,12 @@ Also, please keep the hard line breaks to ensure a nice formatting. - keyword:\ - library:\ - macro:\ -- main function:\ + Rust macros can be recognized by a `!` in the name. Macros are used + when normal functions are not enough. A typical example is `format!`, + which takes a variable number of arguments, which isn't supported by + Rust functions. +- `main` function:\ + Rust programs start executing with the `main` function. - match:\ - memory leak:\ - method:\ @@ -92,6 +97,8 @@ Also, please keep the hard line breaks to ensure a nice formatting. - standard library:\ - static:\ - string:\ + A data type storing textual data. See + [`String` vs `str`](basic-syntax/string-slices.html) for more. - struct:\ - test:\ - thread:\ @@ -102,5 +109,10 @@ Also, please keep the hard line breaks to ensure a nice formatting. - undefined behavior:\ - union:\ - unit test:\ + Rust comes with built-in support for running small unit tests and larger + integration tests. See [Unit Tests](testing/unit-tests.html). - unsafe:\ + The subset of Rust which allows you to trigger _undefined behavior_. + See [Unsafe Rust](unsafe.html). - variable:\ + A memory location storing data. Variables are valid in a _scope_.