You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move frontmatter intro and example ahead of grammar
Many of our existing chapters start directly with the grammar. We're
shifting, however, toward leading with the introduction and with the
introductory example. Let's do that for the frontmatter chapter.
Frontmatter is an optional section of metadata whose syntax allows external tools to read it without parsing Rust.
39
-
40
-
> [!EXAMPLE]
41
-
> <!-- ignore: test runner doesn't support frontmatter -->
42
-
> ```rust,ignore
43
-
> #!/bin/env cargo
44
-
> --- cargo
45
-
> package.edition = "2024"
46
-
> ---
47
-
>
48
-
> fn main() {}
49
-
> ```
50
-
51
51
r[frontmatter.position]
52
52
Frontmatter may appear at the start of the file (after the optional [byte order mark]) or after a [shebang]. In either case, it may be preceded by [whitespace].
0 commit comments