From f972e09f76e5d5557a56026b4ffa78eb76df6564 Mon Sep 17 00:00:00 2001 From: Josh Triplett <josh@joshtriplett.org> Date: Thu, 22 Jun 2023 14:06:15 -0700 Subject: [PATCH] style-guide: Define what an item is --- src/doc/style-guide/src/items.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/doc/style-guide/src/items.md b/src/doc/style-guide/src/items.md index 8a0954f5343..1e0e60248bf 100644 --- a/src/doc/style-guide/src/items.md +++ b/src/doc/style-guide/src/items.md @@ -1,5 +1,10 @@ ## Items +Items consist of the set of things permitted at the top level of a module. +However, Rust also allows some items to appear within some other types of +items, such as within a function. The same formatting conventions apply whether +an item appears at module level or within another item. + `extern crate` statements must be first in a file. They must be ordered alphabetically.