diff --git a/src/items/use-declarations.md b/src/items/use-declarations.md index 94638b6a1..2d760b689 100644 --- a/src/items/use-declarations.md +++ b/src/items/use-declarations.md @@ -396,12 +396,26 @@ r[items.use.ambiguities] > This section is incomplete. r[items.use.ambiguities.intro] -Some situations are an error when there is an ambiguity as to which name a `use` declaration refers. This happens when there are two name candidates that do not resolve to the same entity. +Some situations are an error when there is an ambiguity as to which name a +`use` declaration refers. This happens when there are two name candidates that +do not resolve to the same entity where neither import is +[permitted](names.resolution.expansion.imports.shadowing) to shadow the other. + +r[names.resolution.early.imports.errors.ambiguity.globvsglob] +* it is an error to name an item through ambiguous use declarations + * two globs imports which both have an item matching that name where the items are different + * this is still an error even if there is a third non glob binding resolution to an item with the same name +* it is not an error to have two glob imports which include items which would be ambiguous so long as you do not name one of those items through the ambiguous glob imports r[items.use.ambiguities.glob] Glob imports are allowed to import conflicting names in the same namespace as long as the name is not used. For example: +TODO: move this section? It's documenting a situation that _isnt_ an ambiguity +error. I've been working off of a pattern I think I saw in a few other +locations, where we have specific error sections that document all of the +reference relevant error cases associated with an some part of the language. + ```rust mod foo { pub struct Qux; @@ -442,6 +456,146 @@ fn main() { } ``` +r[names.resolution.early.imports.errors.ambiguity.builtin-attr] +* it is an error to use a user defined attribute or derive macro with the same name as a builtin attribute (e.g. inline) + * I think we may special case this one and allow certain kinds of + ambiguities where the builtin-attr is shadowed by a user attribute (not + sure if this actually exists or is just proposed, TODO investigate) + +```rust +use derive as inline; // OK + +#[inline] // Not OK, ambiguity at use time +fn main() {} +``` + + +```rust,ignore +// myinline/src/lib.rs +use proc_macro::TokenStream; + +#[proc_macro_attribute] +pub fn inline(_attr: TokenStream, item: TokenStream) -> TokenStream { + item +} +``` + + +```rust,ignore +// src/lib.rs +use myinline::inline; +use myinline::inline as myinline; + +#[myinline::inline] +pub fn foo() {} + +#[crate::inline] +pub fn bar() {} + +#[myinline] +pub fn baz() {} + +#[inline] // ERROR `inline` is ambiguous +pub fn quix() {} +``` + +r[names.resolution.early.imports.errors.ambiguity.textualvspathbasedscope] +* path-based scope bindings for macros may not shadow textual scope bindings to macros + * This is sort of an intersection between macros and imports, because at + least in stable rust you can only get path-based macro resolutions from + imports of mbe macros (and presumably from proc macro crates), but you + can only get textual scope of macros from macro declarations + * https://doc.rust-lang.org/nightly/reference/names/namespaces.html#r-names.namespaces.sub-namespaces.use-shadow + * [macro.decl.scope.path.ambiguity] +r[names.resolution.early.imports.errors.ambiguity.globvsouter] +* it is an error to shadow an outer name binding with a glob import + * This seems to only apply to early resolution (duh, I documented this as part of an early resolution codepath) + * // Below we report various ambiguity errors. + // We do not need to report them if we are either in speculative resolution, + // or in late resolution when everything is already imported and expanded + // and no ambiguities exist. + * I attempted to produce an example using structs and it allowed the outer import to shadow the inner glob just fine + +```rust +mod bar { + pub struct Name; +} + +mod baz { + pub struct Name; +} + +use baz::Name; + +pub fn foo() { + use bar::*; + Name; +} +``` + +* I'd like to have a better understanding of why this doesn't trigger ambiguity errors. + * I'm taking a guess but I think it has to do with how and when we resolve + names during early resolution. We resolve all the imports but ambiguities + only occur when observed, so we'd need to try to resolve Name during + early resolution which simply won't happen because it is a struct so it + will never be visited for resolution during expansion. + * We will end up resolving the imports themselves, but they'll resolve fine + because the imports themselves aren't ambiguous + * By the time we get to late resolution we no longer expect there to be any + ambiguities, so we will happily return the first resolution result and + never search for additional ambiguities, so we resolve directly to + `bar::Name` through the glob import + + * doing it with macros produced the expected error +```rust +mod bar { + macro_rules! name { + () => {} + } + pub(crate) use name; +} + +mod baz { + macro_rules! name { + () => {} + } + pub(crate) use name; +} + +use baz::name; + +pub fn foo() { + use bar::*; + name!(); // ERROR `name` is ambiguous +} +``` + +* how does it work with imports? The same as macros, same error during early resolution + +```rust +mod bar { + pub mod foo { + pub struct Name; + } +} + +mod baz { + pub mod foo { + pub struct Name; + } +} + +use baz::foo; + +pub fn foo() { + use bar::*; + use foo::Name; // `foo` is ambiguous +} +``` + +r[names.resolution.early.imports.errors.ambiguity.globvsexpanded] +* Grey Area + [`extern crate`]: extern-crates.md [`macro_rules`]: ../macros-by-example.md [`self`]: ../paths.md#self @@ -460,3 +614,4 @@ fn main() { [tool attributes]: ../attributes.md#tool-attributes [type alias]: type-aliases.md [type namespace]: ../names/namespaces.md +[macro.decl.scope.path.ambiguity]: ../macros-by-example.md#macro.decl.scope.path.ambiguity diff --git a/src/macros-by-example.md b/src/macros-by-example.md index 2fa104ed4..b7a193ae9 100644 --- a/src/macros-by-example.md +++ b/src/macros-by-example.md @@ -326,6 +326,50 @@ fn foo() { // m!(); // Error: m is not in scope. ``` +* textual scope name bindings for macros may shadow path-based scope bindings + to macros + +```rust +macro_rules! m { + () => { + println!("m"); + }; +} + +#[macro_export] +macro_rules! m2 { + () => { + println!("m2"); + }; +} + +use crate::m2 as m; + +m!(); // prints "m\n" +``` + +r[macro.decl.scope.textual.ambiguity.moreexpandedvsouter] +* it is an error for name bindings from macro expansions to shadow name bindings from outside of those expansions + +```rust +macro_rules! name { + () => {} +} + +macro_rules! define_name { + () => { + macro_rules! name { + () => {} + } + } +} + +fn foo() { + define_name!(); + name!(); // ERROR `name` is ambiguous +} +``` + r[macro.decl.scope.macro_use] ### The `macro_use` attribute @@ -410,6 +454,8 @@ When using the [MetaWord] syntax, all exported macros are imported. When using t > ``` r[macro.decl.scope.macro_use.export] +<<<<<<< Conflict 2 of 2 ++++++++ Contents of side #1 Macros to be imported with `macro_use` must be exported with [`macro_export`][macro.decl.scope.macro_export]. @@ -548,6 +594,83 @@ Adding `local_inner_macros` to the `macro_export` attribute causes all single-se > () => { () } > } > ``` +%%%%%%% Changes from base to side #2 + Macros to be imported with `#[macro_use]` must be exported with + `#[macro_export]`, which is described below. + + r[macro.decl.scope.path] + ### Path-based scope + + r[macro.decl.scope.path.intro] + By default, a macro has no path-based scope. However, if it has the + `#[macro_export]` attribute, then it is declared in the crate root scope and can + be referred to normally as such: + + ```rust + self::m!(); + m!(); // OK: Path-based lookup finds m in the current module. + + mod inner { + super::m!(); + crate::m!(); + } + + mod mac { + #[macro_export] + macro_rules! m { + () => {}; + } + } + ``` + ++r[macro.decl.scope.path.reexport] ++ ++* macros can be re-exported to give them path-based scope from a module other than the crate root. ++ * there's some visibility stuff here that may already be mentioned ++ elsewhere. I'm pretty sure that w/o a #[macro_export] the macro being ++ re-exported is implicitly pub(crate) and with one it is implicitly pub. ++ The later is mentioned below, don't remember where I saw the former. ++ ++``` ++mac::m!(); // OK: Path-based lookup finds m in the mac module. ++ ++mod mac { ++ macro_rules! m { ++ () => {}; ++ } ++ pub(crate) use m; ++} ++``` ++ ++ + r[macro.decl.scope.path.export] + Macros labeled with `#[macro_export]` are always `pub` and can be referred to + by other crates, either by path or by `#[macro_use]` as described above. +>>>>>>> Conflict 2 of 2 ends + +r[macro.decl.scope.path.ambiguity] +* path-based scope bindings for macros may not shadow textual scope bindings to macros + * This is sort of an intersection between macros and imports, because at + least in stable rust you can only get path-based macro resolutions from + imports of mbe macros (and presumably from proc macro crates), but you + can only get textual scope of macros from macro declarations + * https://doc.rust-lang.org/nightly/reference/names/namespaces.html#r-names.namespaces.sub-namespaces.use-shadow + +```rust +#[macro_export] +macro_rules! m2 { + () => {} +} + +macro_rules! m { + () => {} +} + +pub fn foo() { + m!(); // ERROR `m` is ambiguous + use crate::m2 as m; +} +``` r[macro.decl.hygiene] ## Hygiene diff --git a/src/names/name-resolution.md b/src/names/name-resolution.md index da60d7eb3..61c01cc0c 100644 --- a/src/names/name-resolution.md +++ b/src/names/name-resolution.md @@ -1,4 +1,174 @@ +r[names.resolution] # Name resolution -> [!NOTE] -> This is a placeholder for future expansion. +r[names.resolution.intro] + +_Name resolution_ is the process of tying paths and other identifiers to the +declarations of those entities. Names are segregated into different +[namespaces], allowing entities in different namespaces to share the same name +without conflict. Each name is valid within a [scope], or a region of source +text where that name may be referenced. Access to certain names may be +restricted based on their [visibility]. + +Name resolution is split into three stages throughout the compilation process. +The first stage, Expansion-time resolution, resolves all [use declarations] and +[macro invocations]. The second stage, Primary resolution, resolves all names +that have not yet been resolved that do not depend on type information to +resolve. The last stage, Type-relative resolution, resolves the remaining names +once type information is available. + +> Note +> +> * Expansion-time resolution is also known as "Early Resolution" +> * Primary resolution is also known as "Late Resolution" + +r[names.resolution.expansion] +## Expansion-time name resolution + +r[names.resolution.expansion.intro] + +Expansion-time name resolution is the stage of name resolution necessary to +complete macro expansion and fully generate a crate's AST. This stage requires +the resolution of macro invocations and use declarations. Resolving use +declarations is required to resolve [path-based scope] macro invocations. +Resolving macro invocations is required in order to expand them. + +The expansion process is iterative, alternately resolving imports, resolving +and expanding macro invocations, then repeating until there are no further +macros invocations to resolve. Once this process is completed all the imports +are resolved again to ensure that the macro expansion process did not introduce +any new ambiguious imports. + +TODO: do we want to talk about this? feels like an implementation detail but +also really helps to understand certain kinds of ambiguity errors that users +can run into. + +> Note +> +> This causes so called time traveling ambiguities, such as when a glob import introduces an item that is ambiguous with its own base path. +> +```rust +macro_rules! m { + () => { mod bar {} } +} + +mod bar { + pub(crate) use m; +} + +fn f() { + // * initially speculatively resolve bar to the module in the crate root + // * expansion of m introduces a second bar module inside the body of f + // * expansion-time resolution finalizes resolutions by re-resolving all + // imports and macro invocations, sees the introduced ambiguity + // and reports it as an error + bar::m!(); // ERROR `bar` is ambiguous +} +``` + +TODO I would like to be able to link to a path-based scope section that + discusses the various kinds of macros that can be invoked via path-based scope. + Right now the section I know of off of the top of my head lives in the macros + by example chapter. + +r[names.resolution.expansion.imports] + +All use declarations are fully resolved during this stage of resolution. +Type-relative paths cannot be resolved at this stage of compilation and will +produce an error. + +* `Type::assoc_item`, `::assoc_item`, `::Variant` and `EnumTyAlias::Variant` are resolved during type checking + * `Trait::assoc_item`, `::assoc_item` and `Enum::Variant` are resolved during late resolution + +```rust +mod my_mod { + pub const Const: () = (); + + pub enum MyEnum { + MyVariant + } + + impl MyEnum { + pub const Const: () = (); + } + + pub type TypeAlias = MyEnum; +} + +fn foo() { + use my_mod::MyEnum; // OK + use my_mod::MyEnum::MyVariant; // OK + use my_mod::TypeAlias; // OK + use my_mod::TypeAlias::MyVariant; // Doesn't work + use my_mod::MyEnum::Const; // Doesn't work + use my_mod::Const; // OK + let _ = my_mod::TypeAlias::MyVariant; // OK + let _ = my_mod::MyEnum::Const; // OK +} +``` + +r[names.resolution.expansion.imports.shadowing] + +The following is a list of situations where shadowing of use declarations is permitted: + +* [use glob shadowing] +* [macro textual scope shadowing] + +r[names.resolution.expansion.imports.errors] +r[names.resolution.expansion.imports.errors.ambiguity] + +TODO shadowing and ambiguity may or may not represent the same section or one may be a subsection of the other + +The following is a list of situations where shadowing of use declarations is +_NOT_ permitted, otherwise known as ambiguity errors: + +* Builtin Attributes +* Derive Helpers +* Textual Vs Path-based Scope +* Glob vs Outer +* Glob vs Glob +* ~~Glob vs Expanded~~ pretty certain we don't want to mention this one +* More Expanded vs Outer + +r[names.resolution.expansion.macros] + +* .visitation-order + * derive helpers + * not visited when resolving derive macros in the parent scope (starting scope) + * derive helpers compat + * always visited + * macro rules bindings (textual scope macros) + * always visited + * modules (path-based scope macros) + * always visited + * macrouseprelude + * not visited in 2018 and later when `#[no_implicit_prelude]` is present + * stdlibprelude + * always visited for macro resolutions + * is it? what about no-std + no-core? + * builtinattrs + * always visited +* .subnamespaces + * macros are split into two subnamespaces, one for bang macros, and the other for attributes and derives. Resolution candidates from the incorrect subnamespace are ignored + * https://doc.rust-lang.org/nightly/reference/names/namespaces.html#r-names.namespaces.sub-namespaces + +r[names.resolution.expansion.macros.errors.reserved-names] + +the names cfg and cfg_attr are reserved in the macro attribute sub-namespace + +* https://doc.rust-lang.org/nightly/reference/names/namespaces.html#r-names.namespaces.sub-namespaces + + +r[names.resolution.late] + +r[names.resolution.type-dependent] + +[use glob shadowing]: ../items/use-declarations.md#r-items.use.glob.shadowing +[Macros]: ../macros.md +[use declarations]: ../items/use-declarations.md +[macro textual scope shadowing]: ../macros-by-example.md#r-macro.decl.scope.textual.shadow +[`let` bindings]: ../statements.md#let-statements +[item definitions]: ../items.md +[namespaces]: ../names/namespaces.md +[scope]: ../names/scopes.md +[visibility]: ../visibility-and-privacy.md diff --git a/src/names/namespaces.md b/src/names/namespaces.md index b3560d2c1..8050cfd1f 100644 --- a/src/names/namespaces.md +++ b/src/names/namespaces.md @@ -119,6 +119,7 @@ For example, the [`cfg` attribute] and the [`cfg` macro] are two different entit r[names.namespaces.sub-namespaces.use-shadow] It is still an error for a [`use` import] to shadow another macro, regardless of their sub-namespaces. +* TODO revisit [`cfg` attribute]: ../conditional-compilation.md#the-cfg-attribute [`cfg` macro]: ../conditional-compilation.md#the-cfg-macro diff --git a/src/procedural-macros.md b/src/procedural-macros.md index 4395e3db9..e7bbca5fe 100644 --- a/src/procedural-macros.md +++ b/src/procedural-macros.md @@ -240,6 +240,32 @@ A helper attribute for a derive macro is declared by adding its identifier to th > } > ``` +r[names.resolution.early.imports.errors.ambiguity.derivehelper] +* derive helpers used before their associated derive may not shadow other attributes or other derive helpers that are otherwise in scope after their derive + * TODO example? This ones harder to do concisely afaik + +Helper attributes may not be used before the macro that introduces them. + +* What happens if two macros introduce the same helper, will the second one not + be able to see the attribute of the first anymore, assuming their order is + "firstmacro" "helper" "secondmacro"? + +> [!NOTE] +> rustc currently allows derive helpers to be used before their attribute macro +> introduces them into scope so long as they do not shadow any other attributes +> or derive helpers that are otherwise correctly in scope. This behavior +> deprecated and slated for removal. +> +> ```rust,ignore +> #[helper] // deprecated, hard error in the future +> #[derive(WithHelperAttr)] +> struct Struct { +> field: (), +> } +> ``` +> +> For more details, see [Rust issue #79202](https://github.com/rust-lang/rust/issues/79202). + r[macro.proc.attribute] ## The `proc_macro_attribute` attribute diff --git a/tags b/tags new file mode 100644 index 000000000..6460ef211 --- /dev/null +++ b/tags @@ -0,0 +1,1135 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ +!_TAG_OUTPUT_FILESEP slash /slash or backslash/ +!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ +!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ +!_TAG_PROC_CWD /home/yaahc/git/rust-lang/reference/ // +!_TAG_PROGRAM_AUTHOR Universal Ctags Team // +!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ +!_TAG_PROGRAM_URL https://ctags.io/ /official site/ +!_TAG_PROGRAM_VERSION 5.9.0 // +#menu-bar theme/reference.css /^#menu-bar {$/;" i ++ .tests-popup + h1) theme/reference.css /^.rule:has(+ h1, + .tests-popup + h1) {$/;" s ++ .tests-popup + h1:target) theme/reference.css /^.rule:has(+ h1:target, + .tests-popup + h1:target),$/;" s ++ .tests-popup + h2) theme/reference.css /^.rule:has(+ h2, + .tests-popup + h2) {$/;" s ++ .tests-popup + h2:target) theme/reference.css /^.rule:has(+ h2:target, + .tests-popup + h2:target),$/;" s ++ .tests-popup + h3) theme/reference.css /^.rule:has(+ h3, + .tests-popup + h3) {$/;" s ++ .tests-popup + h3:target) theme/reference.css /^.rule:has(+ h3:target, + .tests-popup + h3:target),$/;" s ++ .tests-popup + h4) theme/reference.css /^.rule:has(+ h4, + .tests-popup + h4) {$/;" s ++ .tests-popup + h4:target) theme/reference.css /^.rule:has(+ h4:target, + .tests-popup + h4:target),$/;" s ++ .tests-popup + h5) theme/reference.css /^.rule:has(+ h5, + .tests-popup + h5) {$/;" s ++ .tests-popup + h5:target) theme/reference.css /^.rule:has(+ h5:target, + .tests-popup + h5:target),$/;" s ++ .tests-popup + h6) theme/reference.css /^.rule:has(+ h6, + .tests-popup + h6) {$/;" s ++ .tests-popup + h6:target) theme/reference.css /^.rule:has(+ h6:target, + .tests-popup + h6:target) {$/;" s ++ .tests-popup + p) theme/reference.css /^.rule:has(+ p, + .tests-popup + p),$/;" s ++ .tests-popup + ul) theme/reference.css /^.rule:has(+ ul, + .tests-popup + ul) {$/;" s +.alert blockquote theme/reference.css /^.alert blockquote {$/;" s +.alert blockquote > :last-child theme/reference.css /^.alert blockquote > :last-child {$/;" s +.alert blockquote > :nth-child(2) theme/reference.css /^.alert blockquote > :nth-child(2) {$/;" s +.alert-edition .alert-title theme/reference.css /^.alert-edition .alert-title {$/;" c +.alert-edition blockquote theme/reference.css /^.alert-edition blockquote {$/;" s +.alert-example .alert-title theme/reference.css /^.alert-example .alert-title {$/;" c +.alert-example blockquote theme/reference.css /^.alert-example blockquote {$/;" s +.alert-note .alert-title theme/reference.css /^.alert-note .alert-title {$/;" c +.alert-note blockquote theme/reference.css /^.alert-note blockquote {$/;" s +.alert-title theme/reference.css /^.alert-title {$/;" c +.alert-title svg theme/reference.css /^.alert-title svg {$/;" s +.alert-title-edition theme/reference.css /^.alert-title-edition {$/;" c +.alert-warning .alert-title theme/reference.css /^.alert-warning .alert-title {$/;" c +.alert-warning blockquote theme/reference.css /^.alert-warning blockquote {$/;" s +.ayu theme/reference.css /^.ayu {$/;" c +.ayu theme/reference.css /^.coal, .navy, .ayu {$/;" c +.coal theme/reference.css /^.coal, .navy {$/;" c +.coal theme/reference.css /^.coal, .navy, .ayu {$/;" c +.content theme/reference.css /^.page, .content {$/;" c +.content main theme/reference.css /^.content main {$/;" s +.footnote-definition theme/reference.css /^.footnote-definition {$/;" c +.footnote-definition li:first-child > *:first-child theme/reference.css /^.footnote-definition li:first-child > *:first-child {$/;" s +.grammar-comment theme/reference.css /^.grammar-comment {$/;" c +.grammar-comment code.hljs theme/reference.css /^.grammar-comment code.hljs {$/;" c +.grammar-container theme/reference.css /^.grammar-container {$/;" c +.grammar-hidden theme/reference.css /^.grammar-hidden {$/;" c +.grammar-literal theme/reference.css /^.grammar-literal {$/;" c +.grammar-production:target theme/reference.css /^.grammar-production:target, .railroad-production:target {$/;" c +.grammar-production:target::before theme/reference.css /^.grammar-production:target::before, .railroad-production:target::before {$/;" c +.grammar-text theme/reference.css /^.grammar-text {$/;" c +.grammar-toggle-railroad theme/reference.css /^.grammar-toggle-railroad {$/;" c +.history > blockquote theme/reference.css /^.history > blockquote {$/;" s +.light theme/reference.css /^.light {$/;" c +.light theme/reference.css /^.light, .rust {$/;" c +.navy theme/reference.css /^.coal, .navy {$/;" c +.navy theme/reference.css /^.coal, .navy, .ayu {$/;" c +.page theme/reference.css /^.page, .content {$/;" c +.parenthetical theme/reference.css /^.parenthetical {$/;" c +.popup-container theme/reference.css /^.popup-container {$/;" c +.popup-hidden theme/reference.css /^.popup-hidden {$/;" c +.railroad-production theme/reference.css /^.railroad-production {$/;" c +.railroad-production:target theme/reference.css /^.grammar-production:target, .railroad-production:target {$/;" c +.railroad-production:target::before theme/reference.css /^.grammar-production:target::before, .railroad-production:target::before {$/;" c +.railroad-production:target::before theme/reference.css /^.railroad-production:target::before {$/;" c +.rule theme/reference.css /^.rule {$/;" c +.rule .popup-container > a theme/reference.css /^.rule .popup-container > a {$/;" s +.rule-link theme/reference.css /^.rule-link {$/;" c +.rule:has(+ h1 theme/reference.css /^.rule:has(+ h1, + .tests-popup + h1) {$/;" s +.rule:has(+ h1:target theme/reference.css /^.rule:has(+ h1:target, + .tests-popup + h1:target),$/;" s +.rule:has(+ h2 theme/reference.css /^.rule:has(+ h2, + .tests-popup + h2) {$/;" s +.rule:has(+ h2:target theme/reference.css /^.rule:has(+ h2:target, + .tests-popup + h2:target),$/;" s +.rule:has(+ h3 theme/reference.css /^.rule:has(+ h3, + .tests-popup + h3) {$/;" s +.rule:has(+ h3:target theme/reference.css /^.rule:has(+ h3:target, + .tests-popup + h3:target),$/;" s +.rule:has(+ h4 theme/reference.css /^.rule:has(+ h4, + .tests-popup + h4) {$/;" s +.rule:has(+ h4:target theme/reference.css /^.rule:has(+ h4:target, + .tests-popup + h4:target),$/;" s +.rule:has(+ h5 theme/reference.css /^.rule:has(+ h5, + .tests-popup + h5) {$/;" s +.rule:has(+ h5:target theme/reference.css /^.rule:has(+ h5:target, + .tests-popup + h5:target),$/;" s +.rule:has(+ h6 theme/reference.css /^.rule:has(+ h6, + .tests-popup + h6) {$/;" s +.rule:has(+ h6:target theme/reference.css /^.rule:has(+ h6:target, + .tests-popup + h6:target) {$/;" s +.rule:has(+ p theme/reference.css /^.rule:has(+ p, + .tests-popup + p),$/;" s +.rule:has(+ ul theme/reference.css /^.rule:has(+ ul, + .tests-popup + ul) {$/;" s +.rule:target .rule-link theme/reference.css /^.rule:target .rule-link {$/;" c +.rule:target .rule-link::before theme/reference.css /^.rule:target .rule-link::before {$/;" c +.rust theme/reference.css /^.light, .rust {$/;" c +.rust theme/reference.css /^.rust {$/;" c +.test-link theme/reference.css /^.test-link {$/;" c +.tests-popup theme/reference.css /^.tests-popup {$/;" c +.tests-popup:has(+ h2) theme/reference.css /^.tests-popup:has(+ h2) {$/;" s +.tests-popup:has(+ h3) theme/reference.css /^.tests-popup:has(+ h3) {$/;" s +.tests-popup:has(+ h4) theme/reference.css /^.tests-popup:has(+ h4) {$/;" s +.tests-popup:has(+ h5) theme/reference.css /^.tests-popup:has(+ h5) {$/;" s +.tests-popup:has(+ h6) theme/reference.css /^.tests-popup:has(+ h6) {$/;" s +.uncovered-rules-popup theme/reference.css /^.uncovered-rules-popup {$/;" c +7-bit escapes src/expressions/literal-expr.md /^### 7-bit escapes$/;" S section:Literal expressions""Escapes +8-bit escapes src/expressions/literal-expr.md /^### 8-bit escapes$/;" S section:Literal expressions""Escapes +:root theme/reference.css /^:root {$/;" s +ABI src/items/external-blocks.md /^## ABI$/;" s chapter:External blocks +ABI clobbers src/inline-assembly.md /^## ABI clobbers$/;" s chapter:Inline assembly +ADMONITION_RE mdbook-spec/src/admonitions.rs /^static ADMONITION_RE: LazyLock = LazyLock::new(|| {$/;" v +ANCHOR_URL mdbook-spec/src/std_links.rs /^static ANCHOR_URL: Lazy = Lazy::new(|| Regex::new("),$/;" e enum:ExpressionKind +Ambiguities src/items/use-declarations.md /^## Ambiguities$/;" s chapter:Use declarations +Anonymous type parameters src/types/impl-trait.md /^## Anonymous type parameters$/;" s chapter:Impl trait +Appendices src/appendices.md /^# Appendices$/;" c +Appendix: Macro follow-set ambiguity formal specification src/macro-ambiguity.md /^# Appendix: Macro follow-set ambiguity formal specification$/;" c +Application binary interface (ABI) src/abi.md /^# Application binary interface (ABI)$/;" c +Application binary interface (ABI) src/glossary.md /^### Application binary interface (ABI)$/;" S chapter:Glossary +Approximate desugaring src/expressions/await-expr.md /^## Approximate desugaring$/;" s chapter:Await expressions +Are the proposed changes true? docs/review-policy.md /^### Are the proposed changes true?$/;" S section:Review process flowchart +Arithmetic and logical binary operators src/expressions/operator-expr.md /^## Arithmetic and logical binary operators$/;" s chapter:Operator expressions +Arity src/glossary.md /^### Arity$/;" S chapter:Glossary +Array src/glossary.md /^### Array$/;" S chapter:Glossary +Array and array index expressions src/expressions/array-expr.md /^# Array and array index expressions$/;" c +Array and slice indexing expressions src/expressions/array-expr.md /^## Array and slice indexing expressions$/;" s chapter:Array and array index expressions +Array expressions src/expressions/array-expr.md /^## Array expressions$/;" s chapter:Array and array index expressions +Array layout src/type-layout.md /^## Array layout$/;" s chapter:Type layout +Array types src/types/array.md /^# Array types$/;" c +Assigning discriminant values src/items/enumerations.md /^### Assigning discriminant values$/;" S section:Enumerations""Discriminants +Assignment expressions src/expressions/operator-expr.md /^## Assignment expressions$/;" s chapter:Operator expressions +Associated constants src/items/associated-items.md /^## Associated constants$/;" s chapter:Associated items +Associated constants examples src/items/associated-items.md /^### Associated constants examples$/;" S section:Associated items""Associated constants +Associated functions and methods src/items/associated-items.md /^## Associated functions and methods$/;" s chapter:Associated items +Associated item src/glossary.md /^### Associated item$/;" S chapter:Glossary +Associated item scopes src/names/scopes.md /^### Associated item scopes$/;" S section:Scopes""Item scopes +Associated items src/items/associated-items.md /^# Associated items$/;" c +Associated types src/items/associated-items.md /^## Associated types$/;" s chapter:Associated items +Associated types container example src/items/associated-items.md /^### Associated types container example$/;" S section:Associated items""Associated types +Async closure traits src/types/closure.md /^### Async closure traits$/;" S section:Closure types""Call traits and coercions +Async closures src/expressions/closure-expr.md /^## Async closures$/;" s chapter:Closure expressions +Async context src/expressions/block-expr.md /^### Async context$/;" S section:Block expressions""`async` blocks +Async functions src/items/functions.md /^## Async functions$/;" s chapter:Functions +Async input capture src/types/closure.md /^### Async input capture$/;" S section:Closure types""Capture modes +Attribute template docs/attribute-template.md /^# Attribute template$/;" c +Attributes docs/authoring.md /^## Attributes$/;" s chapter:Authoring Guide +Attributes src/attributes.md /^# Attributes$/;" c +Attributes src/items/generics.md /^## Attributes$/;" s chapter:Generic parameters +Attributes src/syntax-index.md /^## Attributes$/;" s chapter:Syntax index +Attributes on block expressions src/expressions/block-expr.md /^## Attributes on block expressions$/;" s chapter:Block expressions +Attributes on closure parameters src/expressions/closure-expr.md /^## Attributes on closure parameters$/;" s chapter:Closure expressions +Attributes on extern blocks src/items/external-blocks.md /^## Attributes on extern blocks$/;" s chapter:External blocks +Attributes on function parameters src/items/external-blocks.md /^### Attributes on function parameters$/;" S section:External blocks""Attributes on extern blocks +Attributes on function parameters src/items/functions.md /^## Attributes on function parameters$/;" s chapter:Functions +Attributes on function pointer parameters src/types/function-pointer.md /^## Attributes on function pointer parameters$/;" s chapter:Function pointer types +Attributes on functions src/items/functions.md /^## Attributes on functions$/;" s chapter:Functions +Attributes on implementations src/items/implementations.md /^## Attributes on implementations$/;" s chapter:Implementations +Attributes on match arms src/expressions/match-expr.md /^## Attributes on match arms$/;" s chapter:`match` expressions +Attributes on method parameters src/items/associated-items.md /^#### Attributes on method parameters$/;" t subsection:Associated items""Associated functions and methods""Methods +Attributes on modules src/items/modules.md /^## Attributes on modules$/;" s chapter:Modules +Attributes on statements src/statements.md /^## Attributes on statements$/;" s chapter:Statements +Authoring Guide docs/authoring.md /^# Authoring Guide$/;" c +Auto traits src/special-types-and-traits.md /^## Auto traits$/;" s chapter:Special types and traits +Automatic capturing src/types/impl-trait.md /^## Automatic capturing$/;" s chapter:Impl trait +Automatic dereferencing src/expressions/field-expr.md /^## Automatic dereferencing$/;" s chapter:Field access expressions +Automatic linking docs/grammar.md /^## Automatic linking$/;" s chapter:Grammar +Available features src/attributes/codegen.md /^### Available features$/;" S section:Code generation attributes""The `target_feature` attribute +Await expressions src/expressions/await-expr.md /^# Await expressions$/;" c +Basic assignments src/expressions/operator-expr.md /^### Basic assignments$/;" S section:Operator expressions""Assignment expressions +Behavior src/attributes/codegen.md /^### Behavior$/;" S section:Code generation attributes""The `track_caller` attribute +Behavior considered undefined src/behavior-considered-undefined.md /^# Behavior considered undefined$/;" c +Behavior not considered `unsafe` src/behavior-not-considered-unsafe.md /^# Behavior not considered `unsafe`$/;" c +Binding modes src/patterns.md /^### Binding modes$/;" S section:Patterns""Identifier patterns +Bit validity src/types/boolean.md /^## Bit validity$/;" s chapter:Boolean type +Bit validity src/types/numeric.md /^## Bit validity$/;" s chapter:Numeric types +Bit validity src/types/pointer.md /^## Bit validity$/;" s chapter:Pointer types +Blanket implementation src/glossary.md /^### Blanket implementation$/;" S chapter:Glossary +Block expressions src/expressions/block-expr.md /^# Block expressions$/;" c +Boolean literal expressions src/expressions/literal-expr.md /^## Boolean literal expressions$/;" s chapter:Literal expressions +Boolean type src/types/boolean.md /^# Boolean type$/;" c +Borrow operators src/expressions/operator-expr.md /^## Borrow operators$/;" s chapter:Operator expressions +Borrowing src/expressions/field-expr.md /^## Borrowing$/;" s chapter:Field access expressions +Bound src/glossary.md /^### Bound$/;" S chapter:Glossary +Brace syntax src/items/use-declarations.md /^## Brace syntax$/;" s chapter:Use declarations +Break mdbook-spec/src/grammar.rs /^ Break(usize),$/;" e enum:ExpressionKind +Building README.md /^## Building$/;" s chapter:The Rust Language Reference +Built-in attributes index src/attributes.md /^## Built-in attributes index$/;" s chapter:Attributes +Byte and byte string literals src/tokens.md /^### Byte and byte string literals$/;" S section:Tokens""Literals +Byte escapes src/tokens.md /^#### Byte escapes$/;" t subsection:Tokens""Literals""Examples +Byte literal expressions src/expressions/literal-expr.md /^## Byte literal expressions$/;" s chapter:Literal expressions +Byte literals src/tokens.md /^#### Byte literals$/;" t subsection:Tokens""Literals""Byte and byte string literals +Byte order mark removal src/input-format.md /^## Byte order mark removal$/;" s chapter:Input format +Byte string literal expressions src/expressions/literal-expr.md /^## Byte string literal expressions$/;" s chapter:Literal expressions +Byte string literals src/tokens.md /^#### Byte string literals$/;" t subsection:Tokens""Literals""Byte and byte string literals +Bytes src/memory-model.md /^## Bytes$/;" s chapter:Memory model +C string and raw C string literals src/tokens.md /^### C string and raw C string literals$/;" S section:Tokens""Literals +C string literal expressions src/expressions/literal-expr.md /^## C string literal expressions$/;" s chapter:Literal expressions +C string literals src/tokens.md /^#### C string literals$/;" t subsection:Tokens""Literals""C string and raw C string literals +CRLF normalization src/input-format.md /^## CRLF normalization$/;" s chapter:Input format +Call expressions src/expressions/call-expr.md /^# Call expressions$/;" c +Call traits and coercions src/types/closure.md /^## Call traits and coercions$/;" s chapter:Closure types +Canonical paths src/paths.md /^## Canonical paths$/;" s chapter:Paths +Capture modes src/expressions/block-expr.md /^### Capture modes$/;" S section:Block expressions""`async` blocks +Capture modes src/types/closure.md /^## Capture modes$/;" s chapter:Closure types +Capture precision src/types/closure.md /^## Capture precision$/;" s chapter:Closure types +Capture precision difference src/types/closure.md /^### Capture precision difference$/;" S section:Closure types""Edition 2018 and before +Capturing src/types/impl-trait.md /^## Capturing$/;" s chapter:Impl trait +Capturing references in move contexts src/types/closure.md /^### Capturing references in move contexts$/;" S section:Closure types""Capture precision +Casting src/items/enumerations.md /^#### Casting$/;" t subsection:Enumerations""Discriminants""Accessing discriminant +Caveat src/type-coercions.md /^### Caveat$/;" S section:Type coercions""Least upper bound coercions +Chains of conditions src/expressions/if-expr.md /^## Chains of conditions$/;" s chapter:`if` expressions +Changelog mdbook-spec/CHANGELOG.md /^# Changelog$/;" c +Character and string literals src/tokens.md /^### Character and string literals$/;" S section:Tokens""Literals +Character escapes src/tokens.md /^#### Character escapes$/;" t subsection:Tokens""Literals""Character and string literals +Character literal expressions src/expressions/literal-expr.md /^## Character literal expressions$/;" s chapter:Literal expressions +Character literals src/tokens.md /^#### Character literals$/;" t subsection:Tokens""Literals""Character and string literals +Characters mdbook-spec/src/grammar.rs /^enum Characters {$/;" g +Characters mdbook-spec/src/grammar/render_markdown.rs /^impl Characters {$/;" c +Characters mdbook-spec/src/grammar/render_railroad.rs /^impl Characters {$/;" c +Characters and strings src/tokens.md /^#### Characters and strings$/;" t subsection:Tokens""Literals""Examples +Charset mdbook-spec/src/grammar.rs /^ Charset(Vec),$/;" e enum:ExpressionKind +Closure expressions src/expressions/closure-expr.md /^# Closure expressions$/;" c +Closure layout src/type-layout.md /^## Closure layout$/;" s chapter:Type layout +Closure trait implementations src/expressions/closure-expr.md /^## Closure trait implementations$/;" s chapter:Closure expressions +Closure types src/types/closure.md /^# Closure types$/;" c +Closure types difference src/types/closure.md /^### Closure types difference$/;" S section:Closure types""Edition 2018 and before +Code examples docs/authoring.md /^### Code examples$/;" S section:Authoring Guide""Markdown formatting +Code generation attributes src/attributes/codegen.md /^# Code generation attributes$/;" c +Coercion sites src/type-coercions.md /^## Coercion sites$/;" s chapter:Type coercions +Coercion types src/type-coercions.md /^## Coercion types$/;" s chapter:Type coercions +Combinator src/glossary.md /^### Combinator$/;" S chapter:Glossary +Combining `async` and `unsafe` src/items/functions.md /^### Combining `async` and `unsafe`$/;" S section:Functions""Async functions +Combining primitive representations of enums with fields and `#[repr(C)]` src/type-layout.md /^#### Combining primitive representations of enums with fields and `#[repr(C)]`$/;" t subsection:Type layout""Representations""Primitive representations +Comment mdbook-spec/src/grammar.rs /^ Comment(String),$/;" e enum:ExpressionKind +Comments src/comments.md /^# Comments$/;" c +Comments src/syntax-index.md /^## Comments$/;" s chapter:Syntax index +Comparison operators src/expressions/operator-expr.md /^## Comparison operators$/;" s chapter:Operator expressions +Comparisons src/types/boolean.md /^### Comparisons$/;" S section:Boolean type""Operations on boolean values +Compound assignment expressions src/expressions/operator-expr.md /^## Compound assignment expressions$/;" s chapter:Operator expressions +Conditional compilation src/conditional-compilation.md /^# Conditional compilation$/;" c +Const context src/const_eval.md /^## Const context$/;" s chapter:Constant evaluation +Const functions src/const_eval.md /^## Const functions$/;" s chapter:Constant evaluation +Const functions src/items/functions.md /^## Const functions$/;" s chapter:Functions +Const generics src/items/generics.md /^### Const generics$/;" S chapter:Generic parameters +Constant evaluation src/const_eval.md /^# Constant evaluation$/;" c +Constant expressions src/const_eval.md /^## Constant expressions$/;" s chapter:Constant evaluation +Constant items src/items/constant-items.md /^# Constant items$/;" c +Constant patterns src/patterns.md /^### Constant patterns$/;" S section:Patterns""Path patterns +Constant promotion src/destructors.md /^### Constant promotion$/;" S section:Destructors""Drop scopes +Constants with destructors src/items/constant-items.md /^## Constants with destructors$/;" s chapter:Constant items +Content guidelines docs/authoring.md /^## Content guidelines$/;" s chapter:Authoring Guide +Contributing src/introduction.md /^## Contributing$/;" s chapter:Introduction +Contributor docs README.md /^## Contributor docs$/;" s chapter:The Rust Language Reference +Control-flow operators src/expressions/block-expr.md /^### Control-flow operators$/;" S section:Block expressions""`async` blocks +Conventions src/introduction.md /^### Conventions$/;" S section:Introduction""How to use this book +Correctness and validity src/inline-assembly.md /^### Correctness and validity$/;" S section:Inline assembly""Rules for naked inline assembly +Crate src/glossary.md /^### Crate$/;" S chapter:Glossary +Crates and source files src/crates-and-source-files.md /^# Crates and source files$/;" c +Critiquing the Reference CONTRIBUTING.md /^## Critiquing the Reference$/;" s +DOC_URL mdbook-spec/src/std_links.rs /^static DOC_URL: Lazy = Lazy::new(|| {$/;" v +Dangling pointers src/behavior-considered-undefined.md /^## Dangling pointers$/;" s chapter:Behavior considered undefined +Debugger attributes src/attributes/debugger.md /^# Debugger attributes$/;" c +Declaration statements src/statements.md /^## Declaration statements$/;" s chapter:Statements +Declarative macro tokens and procedural macro tokens src/procedural-macros.md /^## Declarative macro tokens and procedural macro tokens$/;" s chapter:Procedural macros +Default trait object lifetimes src/lifetime-elision.md /^## Default trait object lifetimes$/;" s chapter:Lifetime elision +Definitions & conventions src/macro-ambiguity.md /^## Definitions & conventions$/;" s chapter:Appendix: Macro follow-set ambiguity formal specification +Delimiters src/tokens.md /^## Delimiters$/;" s chapter:Tokens +Derive src/attributes/derive.md /^# Derive$/;" c +Derive macro helper attributes src/names/scopes.md /^## Derive macro helper attributes$/;" s chapter:Scopes +Derive macro helper attributes src/procedural-macros.md /^### Derive macro helper attributes$/;" S section:Procedural macros""The `proc_macro_derive` attribute +Destructors src/destructors.md /^# Destructors$/;" c +Destructuring src/patterns.md /^## Destructuring$/;" s chapter:Patterns +Destructuring assignments src/expressions/operator-expr.md /^### Destructuring assignments$/;" S section:Operator expressions""Assignment expressions +Diagnostic attributes src/attributes/diagnostics.md /^# Diagnostic attributes$/;" c +Diagnostics mdbook-spec/src/lib.rs /^impl Diagnostics {$/;" c +Diagnostics mdbook-spec/src/lib.rs /^pub struct Diagnostics {$/;" s +Differences between generics and `impl Trait` in return position src/types/impl-trait.md /^## Differences between generics and `impl Trait` in return position$/;" s chapter:Impl trait +Directives support src/inline-assembly.md /^### Directives support$/;" S section:Inline assembly""Rules for naked inline assembly +Disambiguating function calls src/expressions/call-expr.md /^## Disambiguating function calls$/;" s chapter:Call expressions +Discriminants src/items/enumerations.md /^## Discriminants$/;" s chapter:Enumerations +Dispatch src/glossary.md /^### Dispatch$/;" S chapter:Glossary +Doc comments src/comments.md /^## Doc comments$/;" s chapter:Comments +Does this make any new guarantees about the language? docs/review-policy.md /^### Does this make any new guarantees about the language?$/;" S section:Review process flowchart +Drop order src/types/closure.md /^## Drop order$/;" s chapter:Closure types +Drop order difference src/types/closure.md /^### Drop order difference$/;" S section:Closure types""Edition 2018 and before +Drop scopes src/destructors.md /^## Drop scopes$/;" s chapter:Destructors +Dwarf unwinding src/inline-assembly.md /^##### Dwarf unwinding$/;" T subsubsection:Inline assembly""Rules for naked inline assembly""Directives support""Target specific directive support +Dyn compatibility src/items/traits.md /^## Dyn compatibility$/;" s chapter:Traits +Dyn-compatible traits src/glossary.md /^### Dyn-compatible traits$/;" S chapter:Glossary +Dynamic semantics src/patterns.md /^### Dynamic semantics$/;" S section:Patterns""Or-patterns +Dynamically sized type src/glossary.md /^### Dynamically sized type$/;" S chapter:Glossary +Dynamically sized types src/dynamically-sized-types.md /^# Dynamically sized types$/;" c +ESC_RE mdbook-spec/src/grammar/render_markdown.rs /^ static ESC_RE: LazyLock =$/;" v function:markdown_escape +Early name resolution src/names/name-resolution.md /^## Early name resolution$/;" s chapter:Name resolution +Editing the Reference CONTRIBUTING.md /^## Editing the Reference$/;" s +Edition 2018 and before src/types/closure.md /^## Edition 2018 and before$/;" s chapter:Closure types +Editions docs/authoring.md /^### Editions$/;" S section:Authoring Guide""Content guidelines +Entity src/glossary.md /^### Entity$/;" S chapter:Glossary +Enum cast src/expressions/operator-expr.md /^#### Enum cast$/;" t subsection:Operator expressions""Type cast expressions""Semantics +Enumerated types src/types/enum.md /^# Enumerated types$/;" c +Enumerations src/items/enumerations.md /^# Enumerations$/;" c +Error mdbook-spec/src/grammar/parser.rs /^impl Display for Error {$/;" c +Error mdbook-spec/src/grammar/parser.rs /^pub struct Error {$/;" s +Escapes src/expressions/literal-expr.md /^## Escapes$/;" s chapter:Literal expressions +Evaluation src/items/constant-items.md /^## Evaluation$/;" s chapter:Constant items +Evaluation order of operands src/expressions.md /^## Evaluation order of operands$/;" s chapter:Expressions +Example src/expressions/closure-expr.md /^## Example$/;" s chapter:Closure expressions +Example src/inline-assembly.md /^## Example$/;" s chapter:Inline assembly +Examples src/attributes/codegen.md /^#### Examples$/;" t subsection:Code generation attributes""The `track_caller` attribute""Behavior +Examples src/comments.md /^## Examples$/;" s chapter:Comments +Examples src/destructors.md /^#### Examples$/;" t subsection:Destructors""Drop scopes""Temporary lifetime extension +Examples src/tokens.md /^### Examples$/;" S section:Tokens""Literals +Examples for C string and raw C string literals src/tokens.md /^#### Examples for C string and raw C string literals$/;" t subsection:Tokens""Literals""C string and raw C string literals +Examples of FIRST and LAST src/macro-ambiguity.md /^### Examples of FIRST and LAST$/;" S section:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions +Examples of valid and invalid matchers src/macro-ambiguity.md /^### Examples of valid and invalid matchers$/;" S section:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions +Examples: src/type-coercions.md /^### Examples:$/;" S section:Type coercions""Least upper bound coercions +Except mdbook-spec/src/grammar/render_railroad.rs /^impl Except {$/;" c +Except mdbook-spec/src/grammar/render_railroad.rs /^impl Node for Except {$/;" c +Except mdbook-spec/src/grammar/render_railroad.rs /^struct Except {$/;" s +Explicit discriminants src/items/enumerations.md /^#### Explicit discriminants$/;" t subsection:Enumerations""Discriminants""Assigning discriminant values +Explicitly declared entities src/names.md /^## Explicitly declared entities$/;" s chapter:Names +Expression mdbook-spec/src/grammar.rs /^impl Expression {$/;" c +Expression mdbook-spec/src/grammar.rs /^struct Expression {$/;" s +Expression mdbook-spec/src/grammar/render_markdown.rs /^impl Expression {$/;" c +Expression mdbook-spec/src/grammar/render_railroad.rs /^impl Expression {$/;" c +Expression src/glossary.md /^### Expression$/;" S chapter:Glossary +Expression attributes src/expressions.md /^## Expression attributes$/;" s chapter:Expressions +Expression precedence src/expressions.md /^## Expression precedence$/;" s chapter:Expressions +Expression statements src/statements.md /^## Expression statements$/;" s chapter:Statements +ExpressionKind mdbook-spec/src/grammar.rs /^enum ExpressionKind {$/;" g +Expressions src/expressions.md /^# Expressions$/;" c +Expressions src/syntax-index.md /^## Expressions$/;" s chapter:Syntax index +Extending based on expressions src/destructors.md /^#### Extending based on expressions$/;" t subsection:Destructors""Drop scopes""Temporary lifetime extension +Extending based on patterns src/destructors.md /^#### Extending based on patterns$/;" t subsection:Destructors""Drop scopes""Temporary lifetime extension +Extern crate declarations src/items/extern-crates.md /^# Extern crate declarations$/;" c +Extern function qualifier src/items/functions.md /^## Extern function qualifier$/;" s chapter:Functions +Extern prelude src/names/preludes.md /^## Extern prelude$/;" s chapter:Preludes +External blocks src/items/external-blocks.md /^# External blocks$/;" c +FIRST src/macro-ambiguity.md /^#### FIRST$/;" t subsection:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions""FIRST, LAST +FIRST and FOLLOW, informally src/macro-ambiguity.md /^### FIRST and FOLLOW, informally$/;" S section:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions +FIRST, LAST src/macro-ambiguity.md /^### FIRST, LAST$/;" S section:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions +FOLLOW(M) src/macro-ambiguity.md /^### FOLLOW(M)$/;" S section:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions +Field access expressions src/expressions/field-expr.md /^# Field access expressions$/;" c +Field struct expression src/expressions/struct-expr.md /^## Field struct expression$/;" s chapter:Struct expressions +Fields src/names/namespaces.md /^### Fields$/;" S section:Namespaces""Named entities without a namespace +Floating-point literal expressions src/expressions/literal-expr.md /^## Floating-point literal expressions$/;" s chapter:Literal expressions +Floating-point literals src/tokens.md /^#### Floating-point literals$/;" t subsection:Tokens""Literals""Number literals +Floating-point types src/types/numeric.md /^## Floating-point types$/;" s chapter:Numeric types +Follow-set ambiguity restrictions src/macros-by-example.md /^## Follow-set ambiguity restrictions$/;" s chapter:Macros by example +Forms of conditional compilation src/conditional-compilation.md /^## Forms of conditional compilation$/;" s chapter:Conditional compilation +Forwarding a matched fragment src/macros-by-example.md /^### Forwarding a matched fragment$/;" S section:Macros by example""Transcribing +Free item src/glossary.md /^### Free item$/;" S chapter:Glossary +Function body src/items/functions.md /^## Function body$/;" s chapter:Functions +Function item types src/types/function-item.md /^# Function item types$/;" c +Function parameters src/items/functions.md /^## Function parameters$/;" s chapter:Functions +Function pointer types src/types/function-pointer.md /^# Function pointer types$/;" c +Functional update syntax src/expressions/struct-expr.md /^## Functional update syntax$/;" s chapter:Struct expressions +Functions src/items/external-blocks.md /^## Functions$/;" s chapter:External blocks +Functions src/items/functions.md /^# Functions$/;" c +Fundamental traits src/glossary.md /^### Fundamental traits$/;" S chapter:Glossary +Fundamental type constructors src/glossary.md /^### Fundamental type constructors$/;" S chapter:Glossary +GRAMMAR_RE mdbook-spec/src/grammar.rs /^static GRAMMAR_RE: LazyLock =$/;" v +Generic functions src/items/functions.md /^## Generic functions$/;" s chapter:Functions +Generic implementations src/items/implementations.md /^## Generic implementations$/;" s chapter:Implementations +Generic parameter scopes src/names/scopes.md /^## Generic parameter scopes$/;" s chapter:Scopes +Generic parameter shadowing src/names/scopes.md /^### Generic parameter shadowing$/;" S section:Scopes""Generic parameter scopes +Generic parameters src/items/generics.md /^# Generic parameters$/;" c +Generic traits src/items/traits.md /^## Generic traits$/;" s chapter:Traits +Glob imports src/items/use-declarations.md /^## Glob imports$/;" s chapter:Use declarations +Glossary src/glossary.md /^# Glossary$/;" c +Grammar docs/authoring.md /^## Grammar$/;" s chapter:Authoring Guide +Grammar docs/grammar.md /^# Grammar$/;" c +Grammar mdbook-spec/src/grammar.rs /^impl Grammar {$/;" c +Grammar mdbook-spec/src/grammar.rs /^pub struct Grammar {$/;" s +Grammar mdbook-spec/src/grammar/render_markdown.rs /^impl Grammar {$/;" c +Grammar mdbook-spec/src/grammar/render_railroad.rs /^impl Grammar {$/;" c +Grammar src/notation.md /^## Grammar$/;" s chapter:Notation +Grammar summary src/grammar.md /^# Grammar summary$/;" c +Grammar syntax docs/grammar.md /^## Grammar syntax$/;" s chapter:Grammar +Grammar visualizations src/notation.md /^### Grammar visualizations$/;" S section:Notation""Grammar +Grouped mdbook-spec/src/grammar.rs /^ Grouped(Box),$/;" e enum:ExpressionKind +Grouped expressions src/expressions/grouped-expr.md /^# Grouped expressions$/;" c +Grouped patterns src/patterns.md /^## Grouped patterns$/;" s chapter:Patterns +Higher-ranked trait bound scopes src/names/scopes.md /^#### Higher-ranked trait bound scopes$/;" t subsection:Scopes""Generic parameter scopes""Lifetime scopes +Higher-ranked trait bounds src/trait-bounds.md /^## Higher-ranked trait bounds$/;" s chapter:Trait and lifetime bounds +How is this published? README.md /^## How is this published?$/;" s chapter:The Rust Language Reference +How to use this book src/introduction.md /^## How to use this book$/;" s chapter:Introduction +Hygiene src/macros-by-example.md /^## Hygiene$/;" s chapter:Macros by example +Identifier patterns src/patterns.md /^## Identifier patterns$/;" s chapter:Patterns +Identifiers src/identifiers.md /^# Identifiers$/;" c +Impl trait src/types/impl-trait.md /^# Impl trait$/;" c +Impl trait restrictions src/names/scopes.md /^#### Impl trait restrictions$/;" t subsection:Scopes""Generic parameter scopes""Lifetime scopes +Implementations src/items/implementations.md /^# Implementations$/;" c +Implicit borrows src/expressions.md /^### Implicit borrows$/;" S section:Expressions""Place expressions and value expressions +Implicit discriminants src/items/enumerations.md /^#### Implicit discriminants$/;" t subsection:Enumerations""Discriminants""Assigning discriminant values +Implicitly declared entities src/names.md /^## Implicitly declared entities$/;" s chapter:Names +Implied bounds src/trait-bounds.md /^## Implied bounds$/;" s chapter:Trait and lifetime bounds +Inferred type src/types/inferred.md /^# Inferred type$/;" c +Infinite loops src/expressions/loop-expr.md /^## Infinite loops$/;" s chapter:Loops and other breakable expressions +Influences src/influences.md /^# Influences$/;" c +Inhabited src/glossary.md /^### Inhabited$/;" S chapter:Glossary +Inherent implementation src/glossary.md /^### Inherent implementation$/;" S chapter:Glossary +Inherent implementations src/items/implementations.md /^## Inherent implementations$/;" s chapter:Implementations +Inherent method src/glossary.md /^### Inherent method$/;" S chapter:Glossary +Initialization of a union src/items/unions.md /^## Initialization of a union$/;" s chapter:Unions +Initialized src/glossary.md /^### Initialized$/;" S chapter:Glossary +Inline assembly src/inline-assembly.md /^# Inline assembly$/;" c +Input format src/input-format.md /^# Input format$/;" c +Installing mdbook README.md /^### Installing mdbook$/;" S section:The Rust Language Reference""Building +Integer literal expressions src/expressions/literal-expr.md /^## Integer literal expressions$/;" s chapter:Literal expressions +Integer literals src/tokens.md /^#### Integer literals$/;" t subsection:Tokens""Literals""Number literals +Integer overflow src/behavior-not-considered-unsafe.md /^## Integer overflow$/;" s chapter:Behavior not considered `unsafe` +Integer types src/types/numeric.md /^## Integer types$/;" s chapter:Numeric types +Interior mutability src/interior-mutability.md /^# Interior mutability$/;" c +Introduction src/introduction.md /^# Introduction$/;" c +Invalid values src/behavior-considered-undefined.md /^## Invalid values$/;" s chapter:Behavior considered undefined +Is this editorially sound? docs/review-policy.md /^### Is this editorially sound?$/;" S section:Review process flowchart +Is this well written? docs/review-policy.md /^### Is this well written? $/;" S section:Review process flowchart +Item declarations src/statements.md /^### Item declarations$/;" S section:Statements""Declaration statements +Item scopes src/names/scopes.md /^## Item scopes$/;" s chapter:Scopes +Item visibility src/items/traits.md /^## Item visibility$/;" s chapter:Traits +Items src/items.md /^# Items$/;" c +Items src/syntax-index.md /^## Items$/;" s chapter:Syntax index +Iterator loops src/expressions/loop-expr.md /^## Iterator loops$/;" s chapter:Loops and other breakable expressions +Keywords src/keywords.md /^# Keywords$/;" c +Keywords src/syntax-index.md /^## Keywords$/;" s chapter:Syntax index +LAST src/macro-ambiguity.md /^#### LAST$/;" t subsection:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions""FIRST, LAST +LINK_RE mdbook-spec/src/grammar/render_railroad.rs /^ static LINK_RE: LazyLock =$/;" v function:strip_markdown +Labeled block expressions src/expressions/block-expr.md /^## Labeled block expressions$/;" s chapter:Block expressions +Labeled block expressions src/expressions/loop-expr.md /^## Labeled block expressions$/;" s chapter:Loops and other breakable expressions +Language prelude src/names/preludes.md /^## Language prelude$/;" s chapter:Preludes +Layout and bit validity src/types/textual.md /^## Layout and bit validity$/;" s chapter:Textual types +Lazy boolean operators src/expressions/operator-expr.md /^## Lazy boolean operators$/;" s chapter:Operator expressions +Least upper bound coercions src/type-coercions.md /^## Least upper bound coercions$/;" s chapter:Type coercions +Lexical structure src/lexical-structure.md /^# Lexical structure$/;" c +Lifetime bounds src/trait-bounds.md /^## Lifetime bounds$/;" s chapter:Trait and lifetime bounds +Lifetime elision src/lifetime-elision.md /^# Lifetime elision$/;" c +Lifetime elision in functions src/lifetime-elision.md /^## Lifetime elision in functions$/;" s chapter:Lifetime elision +Lifetime generic parameter scopes src/names/scopes.md /^#### Lifetime generic parameter scopes$/;" t subsection:Scopes""Generic parameter scopes""Lifetime scopes +Lifetime scopes src/names/scopes.md /^### Lifetime scopes$/;" S section:Scopes""Generic parameter scopes +Lifetimes and loop labels src/tokens.md /^## Lifetimes and loop labels$/;" s chapter:Tokens +Limitations src/attributes/codegen.md /^### Limitations$/;" S section:Code generation attributes""The `track_caller` attribute +Limitations src/types/impl-trait.md /^## Limitations$/;" s chapter:Impl trait +Limits src/attributes/limits.md /^# Limits$/;" c +Link mdbook-spec/src/std_links.rs /^struct Link<'a> {$/;" s +Linkage src/linkage.md /^# Linkage$/;" c +Linkcheck docs/authoring.md /^### Linkcheck$/;" S section:Authoring Guide""Markdown formatting +Linking modifiers: `bundle` src/items/external-blocks.md /^#### Linking modifiers: `bundle`$/;" t subsection:External blocks""Attributes on extern blocks""The `link` attribute +Linking modifiers: `verbatim` src/items/external-blocks.md /^### Linking modifiers: `verbatim`$/;" S section:External blocks""Attributes on extern blocks +Linking modifiers: `whole-archive` src/items/external-blocks.md /^#### Linking modifiers: `whole-archive`$/;" t subsection:External blocks""Attributes on extern blocks""The `link` attribute +Lint check attributes src/attributes/diagnostics.md /^## Lint check attributes$/;" s chapter:Diagnostic attributes +Lint groups src/attributes/diagnostics.md /^### Lint groups$/;" S section:Diagnostic attributes""Lint check attributes +Lint reasons src/attributes/diagnostics.md /^### Lint reasons$/;" S section:Diagnostic attributes""Lint check attributes +Literal expressions src/expressions/literal-expr.md /^# Literal expressions$/;" c +Literal patterns src/patterns.md /^## Literal patterns$/;" s chapter:Patterns +Literals src/tokens.md /^## Literals$/;" s chapter:Tokens +Local trait src/glossary.md /^### Local trait$/;" S chapter:Glossary +Local type src/glossary.md /^### Local type$/;" S chapter:Glossary +Logic errors src/behavior-not-considered-unsafe.md /^## Logic errors$/;" s chapter:Behavior not considered `unsafe` +Logical and src/types/boolean.md /^### Logical and$/;" S section:Boolean type""Operations on boolean values +Logical not src/types/boolean.md /^### Logical not$/;" S section:Boolean type""Operations on boolean values +Logical or src/types/boolean.md /^### Logical or$/;" S section:Boolean type""Operations on boolean values +Logical xor src/types/boolean.md /^### Logical xor$/;" S section:Boolean type""Operations on boolean values +Loop label scopes src/names/scopes.md /^## Loop label scopes$/;" s chapter:Scopes +Loop labels src/expressions/loop-expr.md /^## Loop labels$/;" s chapter:Loops and other breakable expressions +Loops and other breakable expressions src/expressions/loop-expr.md /^# Loops and other breakable expressions$/;" c +MD_LINK_INLINE mdbook-spec/src/std_links.rs /^static MD_LINK_INLINE: Lazy = Lazy::new(|| Regex::new(r"(?s)(\\[.+\\])(\\(.+\\))").unwrap/;" v +MD_LINK_REFERENCE mdbook-spec/src/std_links.rs /^static MD_LINK_REFERENCE: Lazy = Lazy::new(|| Regex::new(r"(?s)(\\[.+\\])(\\[.*\\])").unw/;" v +MD_LINK_REFERENCE_DEFINITION mdbook-spec/src/lib.rs /^static MD_LINK_REFERENCE_DEFINITION: Lazy =$/;" v +MD_LINK_SHORTCUT mdbook-spec/src/std_links.rs /^static MD_LINK_SHORTCUT: Lazy = Lazy::new(|| Regex::new(r"(?s)(\\[.+\\])").unwrap());$/;" v +Machine-dependent integer types src/types/numeric.md /^## Machine-dependent integer types$/;" s chapter:Numeric types +Macros src/syntax-index.md /^## Macros$/;" s chapter:Syntax index +Macros by example src/macros-by-example.md /^# Macros by example$/;" c +Main functions src/crates-and-source-files.md /^## Main functions$/;" s chapter:Crates and source files +Manually suppressing destructors src/destructors.md /^### Manually suppressing destructors$/;" S section:Destructors""Not running destructors +Markdown formatting docs/authoring.md /^## Markdown formatting$/;" s chapter:Authoring Guide +Match guards src/expressions/match-expr.md /^## Match guards$/;" s chapter:`match` expressions +Meaningful content addition or changes docs/review-policy.md /^## Meaningful content addition or changes$/;" s +Memory allocation and lifetime src/memory-allocation-and-lifetime.md /^# Memory allocation and lifetime$/;" c +Memory model src/memory-model.md /^# Memory model$/;" c +Meta item attribute syntax src/attributes.md /^## Meta item attribute syntax$/;" s chapter:Attributes +Metavariables src/macros-by-example.md /^## Metavariables$/;" s chapter:Macros by example +Method-call expressions src/expressions/method-call-expr.md /^# Method-call expressions$/;" c +Methods src/items/associated-items.md /^### Methods$/;" S section:Associated items""Associated functions and methods +Minor content changes docs/review-policy.md /^## Minor content changes$/;" s +Mixed Rust and foreign codebases src/linkage.md /^## Mixed Rust and foreign codebases$/;" s chapter:Linkage +Module src/glossary.md /^### Module$/;" S chapter:Glossary +Module source filenames src/items/modules.md /^## Module source filenames$/;" s chapter:Modules +Modules src/items/modules.md /^# Modules$/;" c +Moved and copied types src/expressions.md /^### Moved and copied types$/;" S section:Expressions""Place expressions and value expressions +Mutability src/expressions.md /^### Mutability$/;" S section:Expressions""Place expressions and value expressions +Mutable references (`&mut`) src/types/pointer.md /^### Mutable references (`&mut`)$/;" S section:Pointer types""References (`&` and `&mut`) +Mutable statics src/items/static-items.md /^## Mutable statics$/;" s chapter:Static items +NAMES_RE mdbook-spec/src/grammar.rs /^static NAMES_RE: LazyLock =$/;" v +Name src/glossary.md /^### Name$/;" S chapter:Glossary +Name resolution src/glossary.md /^### Name resolution$/;" S chapter:Glossary +Name resolution src/names/name-resolution.md /^# Name resolution$/;" c +Named mdbook-spec/src/grammar.rs /^ Named(String),$/;" e enum:Characters +Named entities without a namespace src/names/namespaces.md /^## Named entities without a namespace$/;" s chapter:Namespaces +Names src/names.md /^# Names$/;" c +Namespace src/glossary.md /^### Namespace$/;" S chapter:Glossary +Namespaces src/names/namespaces.md /^# Namespaces$/;" c +NegExpression mdbook-spec/src/grammar.rs /^ NegExpression(Box),$/;" e enum:ExpressionKind +Negation operators src/expressions/operator-expr.md /^## Negation operators$/;" s chapter:Operator expressions +Never type src/types/never.md /^# Never type$/;" c +Nominal types src/glossary.md /^### Nominal types$/;" S chapter:Glossary +Non-doc comments src/comments.md /^## Non-doc comments$/;" s chapter:Comments +Normalization src/identifiers.md /^## Normalization$/;" s chapter:Identifiers +Not running destructors src/destructors.md /^## Not running destructors$/;" s chapter:Destructors +Notation src/notation.md /^# Notation$/;" c +Nt mdbook-spec/src/grammar.rs /^ Nt(String),$/;" e enum:ExpressionKind +Number literals src/tokens.md /^### Number literals$/;" S section:Tokens""Literals +Numbers src/tokens.md /^#### Numbers$/;" t subsection:Tokens""Literals""Examples +Numeric cast src/expressions/operator-expr.md /^#### Numeric cast$/;" t subsection:Operator expressions""Type cast expressions""Semantics +Numeric types src/types/numeric.md /^# Numeric types$/;" c +Operand type src/inline-assembly.md /^## Operand type$/;" s chapter:Inline assembly +Operands src/destructors.md /^### Operands$/;" S section:Destructors""Drop scopes +Operations on boolean values src/types/boolean.md /^## Operations on boolean values$/;" s chapter:Boolean type +Operator expressions src/expressions/operator-expr.md /^# Operator expressions$/;" c +Operator traits src/special-types-and-traits.md /^## Operator traits$/;" s chapter:Special types and traits +Operators and punctuation src/syntax-index.md /^## Operators and punctuation$/;" s chapter:Syntax index +Optional mdbook-spec/src/grammar.rs /^ Optional(Box),$/;" e enum:ExpressionKind +Options src/inline-assembly.md /^## Options$/;" s chapter:Inline assembly +Or-patterns src/patterns.md /^## Or-patterns$/;" s chapter:Patterns +Orphan rules src/items/implementations.md /^#### Orphan rules$/;" t subsection:Implementations""Trait implementations""Trait implementation coherence +Other tokens src/syntax-index.md /^## Other tokens$/;" s chapter:Syntax index +Other traits src/types/closure.md /^### Other traits$/;" S section:Closure types""Call traits and coercions +Overflow src/expressions/operator-expr.md /^## Overflow$/;" s chapter:Operator expressions +Overloading traits src/expressions.md /^## Overloading traits$/;" s chapter:Expressions +Panic src/panic.md /^# Panic$/;" c +Panic strategy src/panic.md /^## Panic strategy$/;" s chapter:Panic +Parameter patterns src/items/traits.md /^## Parameter patterns$/;" s chapter:Traits +Parenthesized types src/types.md /^### Parenthesized types$/;" S section:Types""Type expressions +Parser mdbook-spec/src/grammar/parser.rs /^impl Parser<'_> {$/;" c +Parser mdbook-spec/src/grammar/parser.rs /^struct Parser<'a> {$/;" s +Path src/glossary.md /^### Path$/;" S chapter:Glossary +Path expressions src/expressions/path-expr.md /^# Path expressions$/;" c +Path patterns src/patterns.md /^## Path patterns$/;" s chapter:Patterns +Path qualifiers src/paths.md /^## Path qualifiers$/;" s chapter:Paths +Paths src/paths.md /^# Paths$/;" c +Paths in expressions src/paths.md /^### Paths in expressions$/;" S section:Paths""Types of paths +Paths in types src/paths.md /^### Paths in types$/;" S section:Paths""Qualified paths +Pattern binding scopes src/names/scopes.md /^## Pattern binding scopes$/;" s chapter:Scopes +Pattern binding shadowing src/names/scopes.md /^### Pattern binding shadowing$/;" S section:Scopes""Pattern binding scopes +Pattern matching on unions src/items/unions.md /^## Pattern matching on unions$/;" s chapter:Unions +Patterns src/patterns.md /^# Patterns$/;" c +Patterns src/syntax-index.md /^## Patterns$/;" s chapter:Syntax index +Place expressions and value expressions src/expressions.md /^## Place expressions and value expressions$/;" s chapter:Expressions +Places based on misaligned pointers src/behavior-considered-undefined.md /^## Places based on misaligned pointers$/;" s chapter:Behavior considered undefined +Pointed-to bytes src/behavior-considered-undefined.md /^## Pointed-to bytes$/;" s chapter:Behavior considered undefined +Pointer casting src/items/enumerations.md /^#### Pointer casting$/;" t subsection:Enumerations""Discriminants""Accessing discriminant +Pointer to address cast src/expressions/operator-expr.md /^#### Pointer to address cast$/;" t subsection:Operator expressions""Type cast expressions""Semantics +Pointer types src/types/pointer.md /^# Pointer types$/;" c +Pointer-to-pointer cast src/expressions/operator-expr.md /^#### Pointer-to-pointer cast$/;" t subsection:Operator expressions""Type cast expressions""Semantics +Pointers and references layout src/type-layout.md /^## Pointers and references layout$/;" s chapter:Type layout +Policy changes docs/review-policy.md /^## Policy changes$/;" s +Precedence with other undelimited patterns src/patterns.md /^### Precedence with other undelimited patterns$/;" S section:Patterns""Or-patterns +Precise capturing src/types/impl-trait.md /^## Precise capturing$/;" s chapter:Impl trait +Predicate loops src/expressions/loop-expr.md /^## Predicate loops$/;" s chapter:Loops and other breakable expressions +Prelude src/glossary.md /^### Prelude$/;" S chapter:Glossary +Prelude scopes src/names/scopes.md /^## Prelude scopes$/;" s chapter:Scopes +Preludes src/names/preludes.md /^# Preludes$/;" c +Primitive data layout src/type-layout.md /^## Primitive data layout$/;" s chapter:Type layout +Primitive representation of enums with fields src/type-layout.md /^#### Primitive representation of enums with fields$/;" t subsection:Type layout""Representations""Primitive representations +Primitive representation of field-less enums src/type-layout.md /^#### Primitive representation of field-less enums$/;" t subsection:Type layout""Representations""Primitive representations +Primitive representations src/type-layout.md /^### Primitive representations$/;" S section:Type layout""Representations +Primitive to integer cast src/expressions/operator-expr.md /^#### Primitive to integer cast$/;" t subsection:Operator expressions""Type cast expressions""Semantics +Procedural macro hygiene src/procedural-macros.md /^## Procedural macro hygiene$/;" s chapter:Procedural macros +Procedural macros src/procedural-macros.md /^# Procedural macros$/;" c +Process termination without unwinding src/destructors.md /^### Process termination without unwinding$/;" S section:Destructors""Not running destructors +Production mdbook-spec/src/grammar.rs /^pub struct Production {$/;" s +Production mdbook-spec/src/grammar/render_markdown.rs /^impl Production {$/;" c +Production mdbook-spec/src/grammar/render_railroad.rs /^impl Production {$/;" c +Prohibited linkage and unwinding src/linkage.md /^### Prohibited linkage and unwinding$/;" S section:Linkage""Mixed Rust and foreign codebases +Prose mdbook-spec/src/grammar.rs /^ Prose(String),$/;" e enum:ExpressionKind +Punctuation src/tokens.md /^## Punctuation$/;" s chapter:Tokens +Qualified paths src/paths.md /^## Qualified paths$/;" s chapter:Paths +Quote escapes src/tokens.md /^#### Quote escapes$/;" t subsection:Tokens""Literals""Examples +RULE_RE mdbook-spec/src/rules.rs /^static RULE_RE: Lazy = Lazy::new(|| Regex::new(r"(?m)^r\\[([^]]+)]$").unwrap());$/;" v +Range mdbook-spec/src/grammar.rs /^ Range(char, char),$/;" e enum:Characters +Range expressions src/expressions/range-expr.md /^# Range expressions$/;" c +Range patterns src/patterns.md /^## Range patterns$/;" s chapter:Patterns +Raw C string literals src/tokens.md /^#### Raw C string literals$/;" t subsection:Tokens""Literals""C string and raw C string literals +Raw borrow operators src/expressions/operator-expr.md /^### Raw borrow operators$/;" S section:Operator expressions""Borrow operators +Raw byte string literals src/tokens.md /^#### Raw byte string literals$/;" t subsection:Tokens""Literals""Byte and byte string literals +Raw identifiers src/identifiers.md /^## Raw identifiers$/;" s chapter:Identifiers +Raw pointer dereference src/types/closure.md /^### Raw pointer dereference$/;" S section:Closure types""Capture precision +Raw pointers (`*const` and `*mut`) src/types/pointer.md /^## Raw pointers (`*const` and `*mut`)$/;" s chapter:Pointer types +Raw string literals src/tokens.md /^#### Raw string literals$/;" t subsection:Tokens""Literals""Character and string literals +Re-exporting and visibility src/visibility-and-privacy.md /^## Re-exporting and visibility$/;" s chapter:Visibility and privacy +Reading and writing union fields src/items/unions.md /^## Reading and writing union fields$/;" s chapter:Unions +Recursive types src/types.md /^## Recursive types$/;" s chapter:Types +Reference into unaligned `struct`s src/types/closure.md /^### Reference into unaligned `struct`s$/;" S section:Closure types""Capture precision +Reference patterns src/patterns.md /^## Reference patterns$/;" s chapter:Patterns +References (`&` and `&mut`) src/types/pointer.md /^## References (`&` and `&mut`)$/;" s chapter:Pointer types +References to union fields src/items/unions.md /^## References to union fields$/;" s chapter:Unions +Refutability src/patterns.md /^## Refutability$/;" s chapter:Patterns +Register names src/inline-assembly.md /^## Register names$/;" s chapter:Inline assembly +Register operands src/inline-assembly.md /^## Register operands$/;" s chapter:Inline assembly +Relationship between `Bounds` and `WhereBounds` src/items/associated-items.md /^### Relationship between `Bounds` and `WhereBounds`$/;" S section:Associated items""Associated types +RenderCtx mdbook-spec/src/grammar.rs /^pub struct RenderCtx {$/;" s +Repeat mdbook-spec/src/grammar.rs /^ Repeat(Box),$/;" e enum:ExpressionKind +RepeatNonGreedy mdbook-spec/src/grammar.rs /^ RepeatNonGreedy(Box),$/;" e enum:ExpressionKind +RepeatPlus mdbook-spec/src/grammar.rs /^ RepeatPlus(Box),$/;" e enum:ExpressionKind +RepeatPlusNonGreedy mdbook-spec/src/grammar.rs /^ RepeatPlusNonGreedy(Box),$/;" e enum:ExpressionKind +RepeatRange mdbook-spec/src/grammar.rs /^ RepeatRange(Box, Option, Option),$/;" e enum:ExpressionKind +Repetitions src/macros-by-example.md /^## Repetitions$/;" s chapter:Macros by example +Representations src/type-layout.md /^## Representations$/;" s chapter:Type layout +Required where clauses on generic associated types src/items/associated-items.md /^### Required where clauses on generic associated types$/;" S section:Associated items""Associated types +Reserved forms similar to number literals src/tokens.md /^#### Reserved forms similar to number literals$/;" t subsection:Tokens""Literals""Number literals +Reserved guards src/tokens.md /^## Reserved guards$/;" s chapter:Tokens +Reserved keywords src/keywords.md /^## Reserved keywords$/;" s chapter:Keywords +Reserved prefixes src/tokens.md /^## Reserved prefixes$/;" s chapter:Tokens +Reserved tokens src/tokens.md /^## Reserved tokens$/;" s chapter:Tokens +Rest pattern src/patterns.md /^## Rest pattern$/;" s chapter:Patterns +Restrictions src/items/enumerations.md /^#### Restrictions$/;" t subsection:Enumerations""Discriminants""Assigning discriminant values +Restrictions src/items/use-declarations.md /^## Restrictions$/;" s chapter:Use declarations +Result mdbook-spec/src/grammar/parser.rs /^type Result = std::result::Result;$/;" t +Result xtask/src/main.rs /^type Result = std::result::Result>;$/;" t +Return-position `impl Trait` in traits and trait implementations src/types/impl-trait.md /^## Return-position `impl Trait` in traits and trait implementations$/;" s chapter:Impl trait +Review process flowchart docs/review-policy.md /^## Review process flowchart$/;" s +Rightmost shared reference truncation src/types/closure.md /^### Rightmost shared reference truncation$/;" S section:Closure types""Capture precision +RuleToTests mdbook-spec/src/test_links.rs /^pub type RuleToTests = HashMap>;$/;" t +Rules docs/authoring.md /^### Rules$/;" S section:Authoring Guide""Special markdown constructs +Rules mdbook-spec/src/rules.rs /^pub struct Rules {$/;" s +Rules for inline assembly src/inline-assembly.md /^## Rules for inline assembly$/;" s chapter:Inline assembly +Rules for naked inline assembly src/inline-assembly.md /^## Rules for naked inline assembly$/;" s chapter:Inline assembly +Running all tests docs/authoring.md /^### Running all tests$/;" S section:Authoring Guide""Markdown formatting +Running mdbook README.md /^### Running mdbook$/;" S section:The Rust Language Reference""Building +Running tests README.md /^## Running tests$/;" s chapter:The Rust Language Reference +Rust reference style guide STYLE.md /^# Rust reference style guide$/;" c +Rust releases src/introduction.md /^## Rust releases$/;" s chapter:Introduction +STD_LINK_EXTRACT_RE mdbook-spec/src/std_links.rs /^static STD_LINK_EXTRACT_RE: Lazy =$/;" v +Scope src/glossary.md /^### Scope$/;" S chapter:Glossary +Scope src/inline-assembly.md /^## Scope$/;" s chapter:Inline assembly +Scopes src/names/scopes.md /^# Scopes$/;" c +Scopes of function parameters src/destructors.md /^### Scopes of function parameters$/;" S section:Destructors""Drop scopes +Scopes of local variables src/destructors.md /^### Scopes of local variables$/;" S section:Destructors""Drop scopes +Scoping, exporting, and importing src/macros-by-example.md /^## Scoping, exporting, and importing$/;" s chapter:Macros by example +Scrutinee src/glossary.md /^### Scrutinee$/;" S chapter:Glossary +Semantics src/expressions/operator-expr.md /^### Semantics$/;" S section:Operator expressions""Type cast expressions +Sequence mdbook-spec/src/grammar.rs /^ Sequence(Vec),$/;" e enum:ExpressionKind +Set configuration options src/conditional-compilation.md /^## Set configuration options$/;" s chapter:Conditional compilation +Shared prefix src/types/closure.md /^### Shared prefix$/;" S section:Closure types""Capture precision +Shared references (`&`) src/types/pointer.md /^### Shared references (`&`)$/;" S section:Pointer types""References (`&` and `&mut`) +Shebang removal src/input-format.md /^## Shebang removal$/;" s chapter:Input format +Simple escapes src/expressions/literal-expr.md /^### Simple escapes$/;" S section:Literal expressions""Escapes +Simple paths src/paths.md /^### Simple paths$/;" S section:Paths""Types of paths +Size src/glossary.md /^### Size$/;" S chapter:Glossary +Size and alignment src/type-layout.md /^## Size and alignment$/;" s chapter:Type layout +Slice src/glossary.md /^### Slice$/;" S chapter:Glossary +Slice layout src/type-layout.md /^## Slice layout$/;" s chapter:Type layout +Slice patterns src/patterns.md /^## Slice patterns$/;" s chapter:Patterns +Slice types src/types/slice.md /^# Slice types$/;" c +Smart pointers src/types/pointer.md /^## Smart pointers$/;" s chapter:Pointer types +Source encoding src/input-format.md /^## Source encoding$/;" s chapter:Input format +Spec mdbook-spec/src/lib.rs /^impl Preprocessor for Spec {$/;" c +Spec mdbook-spec/src/lib.rs /^impl Spec {$/;" c +Spec mdbook-spec/src/lib.rs /^pub struct Spec {$/;" s +Spec mdbook-spec/src/rules.rs /^impl Spec {$/;" c +Spec mdbook-spec/src/test_links.rs /^impl Spec {$/;" c +Special markdown constructs docs/authoring.md /^## Special markdown constructs$/;" s chapter:Authoring Guide +Special types and traits src/special-types-and-traits.md /^# Special types and traits$/;" c +Stabilization CONTRIBUTING.md /^## Stabilization$/;" s +Standard behavior src/panic.md /^### Standard behavior$/;" S section:Panic""The `panic_handler` attribute +Standard library links docs/authoring.md /^### Standard library links$/;" S section:Authoring Guide""Special markdown constructs +Standard library prelude src/names/preludes.md /^## Standard library prelude$/;" s chapter:Preludes +Statement src/glossary.md /^### Statement$/;" S chapter:Glossary +Statements src/statements.md /^# Statements$/;" c +Statements and expressions src/statements-and-expressions.md /^# Statements and expressions$/;" c +Static and dynamic C runtimes src/linkage.md /^## Static and dynamic C runtimes$/;" s chapter:Linkage +Static items src/items/static-items.md /^# Static items$/;" c +Static semantics src/patterns.md /^### Static semantics$/;" S section:Patterns""Or-patterns +Statics src/items/external-blocks.md /^## Statics$/;" s chapter:External blocks +Statics & generics src/items/static-items.md /^## Statics & generics$/;" s chapter:Static items +Strict keywords src/keywords.md /^## Strict keywords$/;" s chapter:Keywords +String continuation escapes src/expressions/literal-expr.md /^### String continuation escapes$/;" S section:Literal expressions""Escapes +String literal src/glossary.md /^### String literal$/;" S chapter:Glossary +String literal expressions src/expressions/literal-expr.md /^## String literal expressions$/;" s chapter:Literal expressions +String literals src/tokens.md /^#### String literals$/;" t subsection:Tokens""Literals""Character and string literals +String slice src/glossary.md /^### String slice$/;" S chapter:Glossary +String table productions src/notation.md /^### String table productions$/;" S section:Notation""Grammar +Struct expressions src/expressions/struct-expr.md /^# Struct expressions$/;" c +Struct field init shorthand src/expressions/struct-expr.md /^### Struct field init shorthand$/;" S section:Struct expressions""Functional update syntax +Struct patterns src/patterns.md /^## Struct patterns$/;" s chapter:Patterns +Struct types src/types/struct.md /^# Struct types$/;" c +Structs src/items/structs.md /^# Structs$/;" c +Structured exception handling src/inline-assembly.md /^##### Structured exception handling$/;" T subsubsection:Inline assembly""Rules for naked inline assembly""Directives support""Target specific directive support +Style docs/authoring.md /^## Style$/;" s chapter:Authoring Guide +Sub-namespaces src/names/namespaces.md /^## Sub-namespaces$/;" s chapter:Namespaces +Subtyping and variance src/subtyping.md /^# Subtyping and variance$/;" c +Suffixes src/tokens.md /^#### Suffixes$/;" t subsection:Tokens""Literals""Examples +Super macros src/expressions.md /^### Super macros$/;" S section:Expressions""Place expressions and value expressions +Supertraits src/items/traits.md /^## Supertraits$/;" s chapter:Traits +Syntax src/inline-assembly.md /^## Syntax$/;" s chapter:Inline assembly +Syntax index src/syntax-index.md /^# Syntax index$/;" c +Target specific directive support src/inline-assembly.md /^#### Target specific directive support$/;" t subsection:Inline assembly""Rules for naked inline assembly""Directives support +Targets docs/authoring.md /^### Targets$/;" S section:Authoring Guide""Content guidelines +Task context src/expressions/await-expr.md /^## Task context$/;" s chapter:Await expressions +Template modifiers src/inline-assembly.md /^## Template modifiers$/;" s chapter:Inline assembly +Template string arguments src/inline-assembly.md /^## Template string arguments$/;" s chapter:Inline assembly +Temporaries src/expressions.md /^### Temporaries$/;" S section:Expressions""Place expressions and value expressions +Temporary lifetime extension src/destructors.md /^### Temporary lifetime extension$/;" S section:Destructors""Drop scopes +Temporary scopes src/destructors.md /^### Temporary scopes$/;" S section:Destructors""Drop scopes +Terminal mdbook-spec/src/grammar.rs /^ Terminal(String),$/;" e enum:Characters +Terminal mdbook-spec/src/grammar.rs /^ Terminal(String),$/;" e enum:ExpressionKind +Test mdbook-spec/src/test_links.rs /^pub struct Test {$/;" s +Test rule annotations docs/authoring.md /^#### Test rule annotations$/;" t subsection:Authoring Guide""Special markdown constructs""Rules +Test summary src/test-summary.md /^# Test summary$/;" c +Testing attributes src/attributes/testing.md /^# Testing attributes$/;" c +Textual scope src/macros-by-example.md /^### Textual scope$/;" S section:Macros by example""Scoping, exporting, and importing +Textual types src/types/textual.md /^# Textual types$/;" c +The Rust Language Reference README.md /^# The Rust Language Reference$/;" c +The Rust Reference src/SUMMARY.md /^# The Rust Reference$/;" c +The Rust runtime src/runtime.md /^# The Rust runtime$/;" c +The `#[expect]` attribute src/attributes/diagnostics.md /^### The `#[expect]` attribute$/;" S section:Diagnostic attributes""Lint check attributes +The `C` representation src/type-layout.md /^### The `C` representation$/;" S section:Type layout""Representations +The `Rust` representation src/type-layout.md /^### The `Rust` representation$/;" S section:Type layout""Representations +The `automatically_derived` attribute src/attributes/derive.md /^## The `automatically_derived` attribute$/;" s chapter:Derive +The `cfg_attr` attribute src/conditional-compilation.md /^### The `cfg_attr` attribute$/;" S section:Conditional compilation""Forms of conditional compilation +The `cfg` attribute src/conditional-compilation.md /^### The `cfg` attribute$/;" S section:Conditional compilation""Forms of conditional compilation +The `cfg` macro src/conditional-compilation.md /^### The `cfg` macro$/;" S section:Conditional compilation""Forms of conditional compilation +The `cold` attribute src/attributes/codegen.md /^### The `cold` attribute$/;" S chapter:Code generation attributes +The `collapse_debuginfo` attribute src/attributes/debugger.md /^## The `collapse_debuginfo` attribute$/;" s chapter:Debugger attributes +The `crate_name` attribute src/crates-and-source-files.md /^## The `crate_name` attribute$/;" s chapter:Crates and source files +The `debugger_visualizer` attribute src/attributes/debugger.md /^## The `debugger_visualizer` attribute$/;" s chapter:Debugger attributes +The `deprecated` attribute src/attributes/diagnostics.md /^## The `deprecated` attribute$/;" s chapter:Diagnostic attributes +The `diagnostic::do_not_recommend` attribute src/attributes/diagnostics.md /^### The `diagnostic::do_not_recommend` attribute$/;" S section:Diagnostic attributes""The `diagnostic` tool attribute namespace +The `diagnostic::on_unimplemented` attribute src/attributes/diagnostics.md /^### The `diagnostic::on_unimplemented` attribute$/;" S section:Diagnostic attributes""The `diagnostic` tool attribute namespace +The `diagnostic` tool attribute namespace src/attributes/diagnostics.md /^## The `diagnostic` tool attribute namespace$/;" s chapter:Diagnostic attributes +The `example` attribute docs/attribute-template.md /^## The `example` attribute$/;" s chapter:Attribute template +The `export_name` attribute src/abi.md /^## The `export_name` attribute$/;" s chapter:Application binary interface (ABI) +The `global_allocator` attribute src/runtime.md /^## The `global_allocator` attribute$/;" s chapter:The Rust runtime +The `ignore` attribute src/attributes/testing.md /^## The `ignore` attribute$/;" s chapter:Testing attributes +The `import_name_type` key src/items/external-blocks.md /^#### The `import_name_type` key$/;" t subsection:External blocks""Attributes on extern blocks""Linking modifiers: `verbatim` +The `inline` attribute src/attributes/codegen.md /^### The `inline` attribute$/;" S chapter:Code generation attributes +The `instruction_set` attribute src/attributes/codegen.md /^## The `instruction_set` attribute$/;" s chapter:Code generation attributes +The `link_name` attribute src/items/external-blocks.md /^### The `link_name` attribute$/;" S section:External blocks""Attributes on extern blocks +The `link_ordinal` attribute src/items/external-blocks.md /^### The `link_ordinal` attribute$/;" S section:External blocks""Attributes on extern blocks +The `link_section` attribute src/abi.md /^## The `link_section` attribute$/;" s chapter:Application binary interface (ABI) +The `link` attribute src/items/external-blocks.md /^### The `link` attribute$/;" S section:External blocks""Attributes on extern blocks +The `macro_export` attribute src/macros-by-example.md /^### The `macro_export` attribute$/;" S section:Macros by example""Scoping, exporting, and importing +The `macro_use` attribute src/macros-by-example.md /^### The `macro_use` attribute$/;" S section:Macros by example""Scoping, exporting, and importing +The `must_use` attribute src/attributes/diagnostics.md /^## The `must_use` attribute$/;" s chapter:Diagnostic attributes +The `naked` attribute src/attributes/codegen.md /^## The `naked` attribute$/;" s chapter:Code generation attributes +The `no_builtins` attribute src/attributes/codegen.md /^## The `no_builtins` attribute$/;" s chapter:Code generation attributes +The `no_implicit_prelude` attribute src/names/preludes.md /^## The `no_implicit_prelude` attribute$/;" s chapter:Preludes +The `no_link` attribute src/items/extern-crates.md /^## The `no_link` attribute$/;" s chapter:Extern crate declarations +The `no_main` attribute src/crates-and-source-files.md /^### The `no_main` attribute$/;" S section:Crates and source files""Main functions +The `no_mangle` attribute src/abi.md /^## The `no_mangle` attribute$/;" s chapter:Application binary interface (ABI) +The `no_std` attribute src/names/preludes.md /^### The `no_std` attribute$/;" S section:Preludes""Extern prelude +The `non_exhaustive` attribute src/attributes/type_system.md /^## The `non_exhaustive` attribute$/;" s chapter:Type system attributes +The `panic_handler` attribute src/panic.md /^## The `panic_handler` attribute$/;" s chapter:Panic +The `path` attribute src/items/modules.md /^### The `path` attribute$/;" S section:Modules""Module source filenames +The `proc_macro_attribute` attribute src/procedural-macros.md /^## The `proc_macro_attribute` attribute$/;" s chapter:Procedural macros +The `proc_macro_derive` attribute src/procedural-macros.md /^## The `proc_macro_derive` attribute$/;" s chapter:Procedural macros +The `proc_macro` attribute src/procedural-macros.md /^## The `proc_macro` attribute$/;" s chapter:Procedural macros +The `proc_macro` crate src/procedural-macros.md /^## The `proc_macro` crate$/;" s chapter:Procedural macros +The `recursion_limit` attribute src/attributes/limits.md /^## The `recursion_limit` attribute$/;" s chapter:Limits +The `should_panic` attribute src/attributes/testing.md /^## The `should_panic` attribute$/;" s chapter:Testing attributes +The `target_feature` attribute src/attributes/codegen.md /^## The `target_feature` attribute$/;" s chapter:Code generation attributes +The `test` attribute src/attributes/testing.md /^## The `test` attribute$/;" s chapter:Testing attributes +The `track_caller` attribute src/attributes/codegen.md /^## The `track_caller` attribute$/;" s chapter:Code generation attributes +The `transparent` representation src/type-layout.md /^### The `transparent` representation$/;" S section:Type layout""Representations +The `type_length_limit` attribute src/attributes/limits.md /^## The `type_length_limit` attribute$/;" s chapter:Limits +The `unsafe` keyword src/unsafe-keyword.md /^# The `unsafe` keyword$/;" c +The `used` attribute src/abi.md /^## The `used` attribute$/;" s chapter:Application binary interface (ABI) +The `windows_subsystem` attribute src/runtime.md /^## The `windows_subsystem` attribute$/;" s chapter:The Rust runtime +The alignment modifiers src/type-layout.md /^### The alignment modifiers$/;" S section:Type layout""Representations +The dereference operator src/expressions/operator-expr.md /^## The dereference operator$/;" s chapter:Operator expressions +The matcher invariants src/macro-ambiguity.md /^### The matcher invariants$/;" S section:Appendix: Macro follow-set ambiguity formal specification""Definitions & conventions +The try propagation expression src/expressions/operator-expr.md /^## The try propagation expression$/;" s chapter:Operator expressions +Tokenization src/input-format.md /^## Tokenization$/;" s chapter:Input format +Tokens src/tokens.md /^# Tokens$/;" c +Tool attributes src/attributes.md /^## Tool attributes$/;" s chapter:Attributes +Tool lint attributes src/attributes/diagnostics.md /^### Tool lint attributes$/;" S section:Diagnostic attributes""Lint check attributes +Tool prelude src/names/preludes.md /^## Tool prelude$/;" s chapter:Preludes +Tooling changes docs/review-policy.md /^## Tooling changes$/;" s +Trait src/glossary.md /^### Trait$/;" S chapter:Glossary +Trait and lifetime bounds src/trait-bounds.md /^# Trait and lifetime bounds$/;" c +Trait bounds src/items/traits.md /^## Trait bounds$/;" s chapter:Traits +Trait implementation coherence src/items/implementations.md /^### Trait implementation coherence$/;" S section:Implementations""Trait implementations +Trait implementations src/items/implementations.md /^## Trait implementations$/;" s chapter:Implementations +Trait object layout src/type-layout.md /^## Trait object layout$/;" s chapter:Type layout +Trait object lifetime bounds src/types/trait-object.md /^## Trait object lifetime bounds$/;" s chapter:Trait objects +Trait objects src/types/trait-object.md /^# Trait objects$/;" c +Traits src/items/traits.md /^# Traits$/;" c +Transcribing src/macros-by-example.md /^## Transcribing$/;" s chapter:Macros by example +Tuple and tuple indexing expressions src/expressions/tuple-expr.md /^# Tuple and tuple indexing expressions$/;" c +Tuple expressions src/expressions/tuple-expr.md /^## Tuple expressions$/;" s chapter:Tuple and tuple indexing expressions +Tuple index src/tokens.md /^#### Tuple index$/;" t subsection:Tokens""Literals""Number literals +Tuple indexing expressions src/expressions/tuple-expr.md /^## Tuple indexing expressions$/;" s chapter:Tuple and tuple indexing expressions +Tuple layout src/type-layout.md /^## Tuple layout$/;" s chapter:Type layout +Tuple patterns src/patterns.md /^## Tuple patterns$/;" s chapter:Patterns +Tuple struct patterns src/patterns.md /^## Tuple struct patterns$/;" s chapter:Patterns +Tuple types src/types/tuple.md /^# Tuple types$/;" c +Turbofish src/glossary.md /^### Turbofish$/;" S chapter:Glossary +Type aliases src/items/type-aliases.md /^# Type aliases$/;" c +Type cast expressions src/expressions/operator-expr.md /^## Type cast expressions$/;" s chapter:Operator expressions +Type coercions src/type-coercions.md /^# Type coercions$/;" c +Type expressions src/syntax-index.md /^## Type expressions$/;" s chapter:Syntax index +Type expressions src/types.md /^## Type expressions$/;" s chapter:Types +Type layout src/type-layout.md /^# Type layout$/;" c +Type parameters src/types/parameters.md /^# Type parameters$/;" c +Type system src/type-system.md /^# Type system$/;" c +Type system attributes src/attributes/type_system.md /^# Type system attributes$/;" c +Types src/types.md /^# Types$/;" c +Types of paths src/paths.md /^## Types of paths$/;" s chapter:Paths +Uncaught foreign unwinding src/crates-and-source-files.md /^### Uncaught foreign unwinding$/;" S section:Crates and source files""Main functions +Uncovered type src/glossary.md /^### Uncovered type$/;" S chapter:Glossary +Undefined behavior src/glossary.md /^### Undefined behavior$/;" S chapter:Glossary +Underscore imports src/items/extern-crates.md /^## Underscore imports$/;" s chapter:Extern crate declarations +Underscore imports src/items/use-declarations.md /^## Underscore imports$/;" s chapter:Use declarations +Unicode mdbook-spec/src/grammar.rs /^ Unicode(String),$/;" e enum:ExpressionKind +Unicode escapes src/expressions/literal-expr.md /^### Unicode escapes$/;" S section:Literal expressions""Escapes +Unicode escapes src/tokens.md /^#### Unicode escapes$/;" t subsection:Tokens""Literals""Examples +Uninhabited src/glossary.md /^### Uninhabited$/;" S chapter:Glossary +Union fields src/types/closure.md /^### Union fields$/;" S section:Closure types""Capture precision +Union types src/types/union.md /^# Union types$/;" c +Unions src/items/unions.md /^# Unions$/;" c +Unique immutable borrows in captures src/types/closure.md /^## Unique immutable borrows in captures$/;" s chapter:Closure types +Unnamed constant src/items/constant-items.md /^## Unnamed constant$/;" s chapter:Constant items +Unsafe attributes (`#[unsafe(attr)]`) src/unsafe-keyword.md /^## Unsafe attributes (`#[unsafe(attr)]`)$/;" s chapter:The `unsafe` keyword +Unsafe blocks (`unsafe {}`) src/unsafe-keyword.md /^## Unsafe blocks (`unsafe {}`)$/;" s chapter:The `unsafe` keyword +Unsafe external blocks (`unsafe extern`) src/unsafe-keyword.md /^## Unsafe external blocks (`unsafe extern`)$/;" s chapter:The `unsafe` keyword +Unsafe functions (`unsafe fn`) src/unsafe-keyword.md /^## Unsafe functions (`unsafe fn`)$/;" s chapter:The `unsafe` keyword +Unsafe trait implementations (`unsafe impl`) src/unsafe-keyword.md /^## Unsafe trait implementations (`unsafe impl`)$/;" s chapter:The `unsafe` keyword +Unsafe traits src/items/traits.md /^## Unsafe traits$/;" s chapter:Traits +Unsafe traits (`unsafe trait`) src/unsafe-keyword.md /^## Unsafe traits (`unsafe trait`)$/;" s chapter:The `unsafe` keyword +Unsafety src/unsafety.md /^# Unsafety$/;" c +Unsized coercions src/type-coercions.md /^### Unsized coercions$/;" S section:Type coercions""Coercion types +Unwinding src/items/functions.md /^### Unwinding$/;" S section:Functions""Extern function qualifier +Unwinding src/panic.md /^## Unwinding$/;" s chapter:Panic +Unwinding across FFI boundaries src/panic.md /^### Unwinding across FFI boundaries$/;" S section:Panic""Unwinding +Use bounds src/trait-bounds.md /^## Use bounds$/;" s chapter:Trait and lifetime bounds +Use declarations src/items/use-declarations.md /^# Use declarations$/;" c +Use declarations src/names/namespaces.md /^### Use declarations$/;" S section:Namespaces""Named entities without a namespace +Using `debugger_visualizer` with GDB src/attributes/debugger.md /^### Using `debugger_visualizer` with GDB$/;" S section:Debugger attributes""The `debugger_visualizer` attribute +Using `debugger_visualizer` with Natvis src/attributes/debugger.md /^### Using `debugger_visualizer` with Natvis$/;" S section:Debugger attributes""The `debugger_visualizer` attribute +Using statics or consts src/items/static-items.md /^## Using statics or consts$/;" s chapter:Static items +Variables src/variables.md /^# Variables$/;" c +Variadic functions src/items/external-blocks.md /^## Variadic functions$/;" s chapter:External blocks +Variance src/subtyping.md /^## Variance$/;" s chapter:Subtyping and variance +Variant visibility src/items/enumerations.md /^## Variant visibility$/;" s chapter:Enumerations +Via `mem::discriminant` src/items/enumerations.md /^#### Via `mem::discriminant`$/;" t subsection:Enumerations""Discriminants""Accessing discriminant +Visibility and privacy src/visibility-and-privacy.md /^# Visibility and privacy$/;" c +Weak keywords src/keywords.md /^## Weak keywords$/;" s chapter:Keywords +What *The Reference* is not src/introduction.md /^## What *The Reference* is not$/;" s chapter:Introduction +Where clauses src/items/generics.md /^## Where clauses$/;" s chapter:Generic parameters +Whitespace src/whitespace.md /^# Whitespace$/;" c +Wildcard pattern src/patterns.md /^## Wildcard pattern$/;" s chapter:Patterns +Wildcard pattern bindings src/types/closure.md /^### Wildcard pattern bindings$/;" S section:Closure types""Capture precision +Would we have added this to the Reference ourselves? docs/review-policy.md /^### Would we have added this to the Reference ourselves?$/;" S section:Review process flowchart +Zero-variant enums src/items/enumerations.md /^## Zero-variant enums$/;" s chapter:Enumerations +`#[repr(C)]` Enums With Fields src/type-layout.md /^#### `#[repr(C)]` Enums With Fields$/;" t subsection:Type layout""Representations""The `C` representation +`#[repr(C)]` Field-less Enums src/type-layout.md /^#### `#[repr(C)]` Field-less Enums$/;" t subsection:Type layout""Representations""The `C` representation +`#[repr(C)]` Structs src/type-layout.md /^#### `#[repr(C)]` Structs$/;" t subsection:Type layout""Representations""The `C` representation +`#[repr(C)]` Unions src/type-layout.md /^#### `#[repr(C)]` Unions$/;" t subsection:Type layout""Representations""The `C` representation +`$crate` src/paths.md /^### `$crate`$/;" S section:Paths""Path qualifiers +`::` src/paths.md /^### `::`$/;" S section:Paths""Path qualifiers +`?Sized` src/trait-bounds.md /^## `?Sized`$/;" s chapter:Trait and lifetime bounds +`Arc` src/special-types-and-traits.md /^## `Arc`$/;" s chapter:Special types and traits +`Box` src/special-types-and-traits.md /^## `Box`$/;" s chapter:Special types and traits +`Box` vs other `Deref` implementations src/types/closure.md /^### `Box` vs other `Deref` implementations$/;" S section:Closure types""Capture precision +`Box` with move closure src/types/closure.md /^#### `Box` with move closure$/;" t subsection:Closure types""Capture precision""`Box` vs other `Deref` implementations +`Box` with non-`move` closure src/types/closure.md /^#### `Box` with non-`move` closure$/;" t subsection:Closure types""Capture precision""`Box` vs other `Deref` implementations +`Clone` src/special-types-and-traits.md /^## `Clone`$/;" s chapter:Special types and traits +`Copy` src/special-types-and-traits.md /^## `Copy`$/;" s chapter:Special types and traits +`Copy` values src/types/closure.md /^### `Copy` values$/;" S section:Closure types""Capture modes +`Deref` and `DerefMut` src/special-types-and-traits.md /^## `Deref` and `DerefMut`$/;" s chapter:Special types and traits +`Drop` src/special-types-and-traits.md /^## `Drop`$/;" s chapter:Special types and traits +`PhantomData` src/special-types-and-traits.md /^## `PhantomData`$/;" s chapter:Special types and traits +`Pin

` src/special-types-and-traits.md /^## `Pin

`$/;" s chapter:Special types and traits +`Rc` src/special-types-and-traits.md /^## `Rc`$/;" s chapter:Special types and traits +`SPEC_DENY_WARNINGS` README.md /^### `SPEC_DENY_WARNINGS`$/;" S section:The Rust Language Reference""Building +`SPEC_RELATIVE` README.md /^### `SPEC_RELATIVE`$/;" S section:The Rust Language Reference""Building +`SPEC_RUST_ROOT` README.md /^### `SPEC_RUST_ROOT`$/;" S section:The Rust Language Reference""Building +`Self` src/paths.md /^### `Self`$/;" S section:Paths""Path qualifiers +`Self` scope src/names/scopes.md /^## `Self` scope$/;" s chapter:Scopes +`Send` src/special-types-and-traits.md /^## `Send`$/;" s chapter:Special types and traits +`Sized` src/special-types-and-traits.md /^## `Sized`$/;" s chapter:Special types and traits +`Sync` src/special-types-and-traits.md /^## `Sync`$/;" s chapter:Special types and traits +`Termination` src/special-types-and-traits.md /^## `Termination`$/;" s chapter:Special types and traits +`UnsafeCell` src/special-types-and-traits.md /^## `UnsafeCell`$/;" s chapter:Special types and traits +`_` expressions src/expressions/underscore-expr.md /^# `_` expressions$/;" c +`aarch64` src/attributes/codegen.md /^#### `aarch64`$/;" t subsection:Code generation attributes""The `target_feature` attribute""Available features +`as` renames src/items/use-declarations.md /^## `as` renames$/;" s chapter:Use declarations +`async` blocks src/expressions/block-expr.md /^## `async` blocks$/;" s chapter:Block expressions +`break` and loop values src/expressions/loop-expr.md /^## `break` and loop values$/;" s chapter:Loops and other breakable expressions +`break` expressions src/expressions/loop-expr.md /^## `break` expressions$/;" s chapter:Loops and other breakable expressions +`const` and `static` elision src/lifetime-elision.md /^## `const` and `static` elision$/;" s chapter:Lifetime elision +`const` blocks src/expressions/block-expr.md /^## `const` blocks$/;" s chapter:Block expressions +`continue` expressions src/expressions/loop-expr.md /^## `continue` expressions$/;" s chapter:Loops and other breakable expressions +`crate` src/paths.md /^### `crate`$/;" S section:Paths""Path qualifiers +`debug_assertions` src/conditional-compilation.md /^### `debug_assertions`$/;" S section:Conditional compilation""Set configuration options +`dylib` versus `raw-dylib` src/items/external-blocks.md /^#### `dylib` versus `raw-dylib`$/;" t subsection:External blocks""Attributes on extern blocks""Linking modifiers: `verbatim` +`format_args!` src/expressions.md /^#### `format_args!`$/;" t subsection:Expressions""Place expressions and value expressions""Super macros +`if let` patterns src/expressions/if-expr.md /^## `if let` patterns$/;" s chapter:`if` expressions +`if` expressions src/expressions/if-expr.md /^# `if` expressions$/;" c +`instruction_set` on ARM src/attributes/codegen.md /^### `instruction_set` on ARM$/;" S section:Code generation attributes""The `instruction_set` attribute +`let` statements src/statements.md /^### `let` statements$/;" S section:Statements""Declaration statements +`loongarch` src/attributes/codegen.md /^#### `loongarch`$/;" t subsection:Code generation attributes""The `target_feature` attribute""Available features +`macro_rules` scopes src/names/scopes.md /^## `macro_rules` scopes$/;" s chapter:Scopes +`macro_use` prelude src/names/preludes.md /^## `macro_use` prelude$/;" s chapter:Preludes +`match` expressions src/expressions/match-expr.md /^# `match` expressions$/;" c +`panic` src/conditional-compilation.md /^### `panic`$/;" S section:Conditional compilation""Set configuration options +`pin!` src/expressions.md /^#### `pin!`$/;" t subsection:Expressions""Place expressions and value expressions""Super macros +`proc_macro` src/conditional-compilation.md /^### `proc_macro`$/;" S section:Conditional compilation""Set configuration options +`pub(in path)`, `pub(crate)`, `pub(super)`, and `pub(self)` src/visibility-and-privacy.md /^## `pub(in path)`, `pub(crate)`, `pub(super)`, and `pub(self)`$/;" s chapter:Visibility and privacy +`return` expressions src/expressions/return-expr.md /^# `return` expressions$/;" c +`riscv32` or `riscv64` src/attributes/codegen.md /^#### `riscv32` or `riscv64`$/;" t subsection:Code generation attributes""The `target_feature` attribute""Available features +`self` src/paths.md /^### `self`$/;" S section:Paths""Path qualifiers +`self` imports src/items/use-declarations.md /^## `self` imports$/;" s chapter:Use declarations +`str` Layout src/type-layout.md /^## `str` Layout$/;" s chapter:Type layout +`super` src/paths.md /^### `super`$/;" S section:Paths""Path qualifiers +`target_abi` src/conditional-compilation.md /^### `target_abi`$/;" S section:Conditional compilation""Set configuration options +`target_arch` src/conditional-compilation.md /^### `target_arch`$/;" S section:Conditional compilation""Set configuration options +`target_endian` src/conditional-compilation.md /^### `target_endian`$/;" S section:Conditional compilation""Set configuration options +`target_env` src/conditional-compilation.md /^### `target_env`$/;" S section:Conditional compilation""Set configuration options +`target_family` src/conditional-compilation.md /^### `target_family`$/;" S section:Conditional compilation""Set configuration options +`target_feature` src/conditional-compilation.md /^### `target_feature`$/;" S section:Conditional compilation""Set configuration options +`target_has_atomic` src/conditional-compilation.md /^### `target_has_atomic`$/;" S section:Conditional compilation""Set configuration options +`target_os` src/conditional-compilation.md /^### `target_os`$/;" S section:Conditional compilation""Set configuration options +`target_pointer_width` src/conditional-compilation.md /^### `target_pointer_width`$/;" S section:Conditional compilation""Set configuration options +`target_vendor` src/conditional-compilation.md /^### `target_vendor`$/;" S section:Conditional compilation""Set configuration options +`test` src/conditional-compilation.md /^### `test`$/;" S section:Conditional compilation""Set configuration options +`u8` to `char` cast src/expressions/operator-expr.md /^#### `u8` to `char` cast$/;" t subsection:Operator expressions""Type cast expressions""Semantics +`unix` and `windows` src/conditional-compilation.md /^### `unix` and `windows`$/;" S section:Conditional compilation""Set configuration options +`unsafe` blocks src/expressions/block-expr.md /^## `unsafe` blocks$/;" s chapter:Block expressions +`use` Paths src/items/use-declarations.md /^## `use` Paths$/;" s chapter:Use declarations +`use` Visibility src/items/use-declarations.md /^## `use` Visibility$/;" s chapter:Use declarations +`wasm32` or `wasm64` src/attributes/codegen.md /^#### `wasm32` or `wasm64`$/;" t subsection:Code generation attributes""The `target_feature` attribute""Available features +`while let` patterns src/expressions/loop-expr.md /^### `while let` patterns$/;" S section:Loops and other breakable expressions""Predicate loops +`while` condition chains src/expressions/loop-expr.md /^### `while` condition chains$/;" S section:Loops and other breakable expressions""Predicate loops +`x86` or `x86_64` src/attributes/codegen.md /^#### `x86` or `x86_64`$/;" t subsection:Code generation attributes""The `target_feature` attribute""Available features +admonitions mdbook-spec/src/admonitions.rs /^pub fn admonitions(chapter: &Chapter, diag: &mut Diagnostics) -> String {$/;" f +admonitions mdbook-spec/src/lib.rs /^mod admonitions;$/;" n +auto_link_references mdbook-spec/src/lib.rs /^ fn auto_link_references(&self, chapter: &Chapter, rules: &Rules) -> String {$/;" P implementation:Spec +bail mdbook-spec/src/grammar/parser.rs /^macro_rules! bail {$/;" M +box_kind mdbook-spec/src/grammar/parser.rs /^fn box_kind(kind: ExpressionKind) -> Box {$/;" f +bug mdbook-spec/src/lib.rs /^macro_rules! bug {$/;" M +cargo_test xtask/src/main.rs /^fn cargo_test() -> Result<()> {$/;" f +category mdbook-spec/src/grammar.rs /^ category: String,$/;" m struct:Production +charset_render_markdown mdbook-spec/src/grammar/render_markdown.rs /^fn charset_render_markdown(cx: &RenderCtx, set: &[Characters], output: &mut String) {$/;" f +check_directory style-check/src/main.rs /^fn check_directory(dir: &Path, bad: &mut bool) -> Result<(), Box> {$/;" f +check_undefined_nt mdbook-spec/src/grammar.rs /^fn check_undefined_nt(grammar: &Grammar, diag: &mut Diagnostics) {$/;" f +check_unexpected_roots mdbook-spec/src/grammar.rs /^fn check_unexpected_roots(grammar: &Grammar, diag: &mut Diagnostics) {$/;" f +cmark_check style-check/src/main.rs /^fn cmark_check(path: &Path, bad: &mut bool, contents: &str) -> Result<(), Box> {$/;" f +cmark_error style-check/src/main.rs /^ macro_rules! cmark_error {$/;" M function:cmark_check +col mdbook-spec/src/grammar/parser.rs /^ col: usize,$/;" m struct:Error +collect_markdown_links mdbook-spec/src/std_links.rs /^fn collect_markdown_links<'a>(chapter: &'a Chapter, diag: &mut Diagnostics) -> Vec> {$/;" f +collect_rules mdbook-spec/src/rules.rs /^ pub fn collect_rules(&self, book: &Book, diag: &mut Diagnostics) -> Rules {$/;" P implementation:Spec +collect_tests mdbook-spec/src/test_links.rs /^ pub fn collect_tests(&self, rules: &Rules) -> RuleToTests {$/;" P implementation:Spec +comments mdbook-spec/src/grammar.rs /^ comments: Vec,$/;" m struct:Production +compute_replacements mdbook-spec/src/std_links.rs /^fn compute_replacements<'a>($/;" f +count mdbook-spec/src/lib.rs /^ count: u32,$/;" m struct:Diagnostics +def_paths mdbook-spec/src/rules.rs /^ pub def_paths: BTreeMap,$/;" m struct:Rules +deny_warnings mdbook-spec/src/lib.rs /^ deny_warnings: bool,$/;" m struct:Diagnostics +dest_url mdbook-spec/src/std_links.rs /^ dest_url: CowStr<'a>,$/;" m struct:Link +dfn theme/reference.css /^dfn {$/;" s +draw mdbook-spec/src/grammar/render_railroad.rs /^ fn draw(&self, x: i64, y: i64, h_dir: svg::HDir) -> svg::Element {$/;" P implementation:Except +entry_height mdbook-spec/src/grammar/render_railroad.rs /^ fn entry_height(&self) -> i64 {$/;" P implementation:Except +eof mdbook-spec/src/grammar/parser.rs /^ fn eof(&mut self) -> bool {$/;" P implementation:Parser +error mdbook-spec/src/grammar/parser.rs /^ fn error(&mut self, message: String) -> Error {$/;" P implementation:Parser +expect mdbook-spec/src/grammar/parser.rs /^ fn expect(&mut self, s: &str, err: &str) -> Result<()> {$/;" P implementation:Parser +expression mdbook-spec/src/grammar.rs /^ expression: Expression,$/;" m struct:Production +fmt mdbook-spec/src/grammar/parser.rs /^ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {$/;" P implementation:Error +fmt xtask/src/main.rs /^fn fmt() -> Result<()> {$/;" f +fmt_pct mdbook-spec/src/test_links.rs /^fn fmt_pct(uncovered: usize, total: usize) -> String {$/;" f +footnote mdbook-spec/src/grammar.rs /^ footnote: Option,$/;" m struct:Expression +for_summary mdbook-spec/src/grammar.rs /^ for_summary: bool,$/;" m struct:RenderCtx +get_railroad theme/reference.js /^function get_railroad() {$/;" f +git_ref mdbook-spec/src/lib.rs /^fn git_ref(rust_root: &Option) -> Result {$/;" f +grammar mdbook-spec/src/lib.rs /^pub mod grammar;$/;" n +handle_preprocessing mdbook-spec/src/lib.rs /^pub fn handle_preprocessing() -> Result<(), Error> {$/;" f +height mdbook-spec/src/grammar/render_railroad.rs /^ fn height(&self) -> i64 {$/;" P implementation:Except +hr theme/reference.css /^hr {$/;" s +index mdbook-spec/src/grammar/parser.rs /^ index: usize,$/;" m struct:Parser +inner mdbook-spec/src/grammar/render_railroad.rs /^ inner: LabeledBox, Box>,$/;" m struct:Except +input mdbook-spec/src/grammar/parser.rs /^ input: &'a str,$/;" m struct:Parser +insert_grammar mdbook-spec/src/grammar.rs /^pub fn insert_grammar(grammar: &Grammar, chapter: &Chapter, diag: &mut Diagnostics) -> String {$/;" f +insert_summary mdbook-spec/src/grammar.rs /^pub fn insert_summary(grammar: &Grammar, chapter: &Chapter, diag: &mut Diagnostics) -> String {$/;" f +interior_prefixes mdbook-spec/src/rules.rs /^ pub interior_prefixes: HashSet,$/;" m struct:Rules +invert_rule_map mdbook-spec/src/test_links.rs /^fn invert_rule_map(rules: &Rules) -> HashMap> {$/;" f +is_break mdbook-spec/src/grammar.rs /^ fn is_break(&self) -> bool {$/;" P implementation:Expression +is_root mdbook-spec/src/grammar.rs /^ is_root: bool,$/;" m struct:Production +is_summary mdbook-spec/src/grammar.rs /^pub fn is_summary(chapter: &Chapter) -> bool {$/;" f +kbd theme/reference.css /^kbd {$/;" s +kbd.optional theme/reference.css /^kbd.optional {$/;" c +kind mdbook-spec/src/grammar.rs /^ kind: ExpressionKind,$/;" m struct:Expression +last mdbook-spec/src/grammar/render_markdown.rs /^ fn last(&self) -> &ExpressionKind {$/;" P implementation:Expression +line mdbook-spec/src/grammar/parser.rs /^ line: String,$/;" m struct:Error +line_from_range mdbook-spec/src/lib.rs /^fn line_from_range<'a>(contents: &'a str, range: &Range) -> &'a str {$/;" f +lineno mdbook-spec/src/grammar/parser.rs /^ lineno: usize,$/;" m struct:Error +link_type mdbook-spec/src/std_links.rs /^ link_type: LinkType,$/;" m struct:Link +linkcheck xtask/src/main.rs /^fn linkcheck(args: impl Iterator) -> Result<()> {$/;" f +load_grammar mdbook-spec/src/grammar.rs /^pub fn load_grammar(book: &Book, diag: &mut Diagnostics) -> Grammar {$/;" f +main mdbook-spec/src/main.rs /^fn main() {$/;" f +main style-check/src/main.rs /^fn main() {$/;" f +main theme/reference.css /^main {$/;" s +main xtask/src/main.rs /^fn main() -> Result<()> {$/;" f +main > * theme/reference.css /^main > * {$/;" s +main > .rule theme/reference.css /^main > .rule {$/;" c +main > blockquote theme/reference.css /^main > blockquote {$/;" s +main > h2 theme/reference.css /^main > h2 {$/;" s +main > h3 theme/reference.css /^main > h3 {$/;" s +main > h4 theme/reference.css /^main > h4 {$/;" s +main > h5 theme/reference.css /^main > h5 {$/;" s +main > h6 theme/reference.css /^main > h6 {$/;" s +main > p theme/reference.css /^main > p,$/;" s +main > pre theme/reference.css /^main > pre,$/;" s +main > pre > pre.playground theme/reference.css /^main > pre > pre.playground,$/;" c +main > ul theme/reference.css /^main > ul {$/;" s +main > ul > li > *:first-child theme/reference.css /^main > ul > li > *:first-child,$/;" s +main > ul > li > *:last-child theme/reference.css /^main > ul > li > *:last-child,$/;" s +main > ul > li > pre:first-child > pre.playground theme/reference.css /^main > ul > li > pre:first-child > pre.playground {$/;" c +main > ul > li > pre:last-child > pre.playground theme/reference.css /^main > ul > li > pre:last-child > pre.playground {$/;" c +make_diagram mdbook-spec/src/grammar/render_railroad.rs /^ fn make_diagram(&self, cx: &RenderCtx, stack: bool) -> Diagram> {$/;" P implementation:Production +make_relative_link_map mdbook-spec/src/grammar.rs /^fn make_relative_link_map(grammar: &Grammar, chapter: &Chapter) -> HashMap {$/;" f +make_summary_table mdbook-spec/src/test_links.rs /^pub fn make_summary_table(book: &Book, tests: &RuleToTests, rules: &Rules) -> String {$/;" f +markdown_escape mdbook-spec/src/grammar/render_markdown.rs /^fn markdown_escape(s: &str) -> Cow<'_, str> {$/;" f +markdown_id mdbook-spec/src/grammar/render_markdown.rs /^pub fn markdown_id(name: &str, for_summary: bool) -> String {$/;" f +md_link_map mdbook-spec/src/grammar.rs /^ md_link_map: HashMap,$/;" m struct:RenderCtx +mdbook-spec mdbook-spec/README.md /^# mdbook-spec$/;" c +mdbook-spec 0.1.0 mdbook-spec/CHANGELOG.md /^## mdbook-spec 0.1.0$/;" s chapter:Changelog +mdbook-spec 0.1.1 mdbook-spec/CHANGELOG.md /^## mdbook-spec 0.1.1$/;" s chapter:Changelog +mdbook-spec 0.1.2 mdbook-spec/CHANGELOG.md /^## mdbook-spec 0.1.2$/;" s chapter:Changelog +mdbook_test xtask/src/main.rs /^fn mdbook_test() -> Result<()> {$/;" f +message mdbook-spec/src/grammar/parser.rs /^ message: String,$/;" m struct:Error +name mdbook-spec/src/grammar.rs /^ name: String,$/;" m struct:Production +name mdbook-spec/src/lib.rs /^ fn name(&self) -> &str {$/;" P implementation:Spec +name_order mdbook-spec/src/grammar.rs /^ pub name_order: Vec,$/;" m struct:Grammar +new mdbook-spec/src/grammar/render_railroad.rs /^ fn new(inner: Box, label: Box) -> Self {$/;" P implementation:Except +new mdbook-spec/src/lib.rs /^ fn new() -> Diagnostics {$/;" P implementation:Diagnostics +new mdbook-spec/src/lib.rs /^ pub fn new(rust_root: Option) -> Result {$/;" P implementation:Spec +new_kind mdbook-spec/src/grammar.rs /^ fn new_kind(kind: ExpressionKind) -> Self {$/;" P implementation:Expression +node_for_nt mdbook-spec/src/grammar/render_railroad.rs /^fn node_for_nt(cx: &RenderCtx, name: &str) -> Box {$/;" f +parse_characters mdbook-spec/src/grammar/parser.rs /^ fn parse_characters(&mut self) -> Result> {$/;" P implementation:Parser +parse_charset mdbook-spec/src/grammar/parser.rs /^ fn parse_charset(&mut self) -> Result {$/;" P implementation:Parser +parse_comment mdbook-spec/src/grammar/parser.rs /^ fn parse_comment(&mut self) -> Result {$/;" P implementation:Parser +parse_expr1 mdbook-spec/src/grammar/parser.rs /^ fn parse_expr1(&mut self) -> Result> {$/;" P implementation:Parser +parse_expression mdbook-spec/src/grammar/parser.rs /^ fn parse_expression(&mut self) -> Result> {$/;" P implementation:Parser +parse_footnote mdbook-spec/src/grammar/parser.rs /^ fn parse_footnote(&mut self) -> Result> {$/;" P implementation:Parser +parse_grammar mdbook-spec/src/grammar/parser.rs /^pub fn parse_grammar($/;" f +parse_grouped mdbook-spec/src/grammar/parser.rs /^ fn parse_grouped(&mut self) -> Result {$/;" P implementation:Parser +parse_is_root mdbook-spec/src/grammar/parser.rs /^ fn parse_is_root(&mut self) -> bool {$/;" P implementation:Parser +parse_name mdbook-spec/src/grammar/parser.rs /^ fn parse_name(&mut self) -> Option {$/;" P implementation:Parser +parse_neg_expression mdbook-spec/src/grammar/parser.rs /^ fn parse_neg_expression(&mut self) -> Result {$/;" P implementation:Parser +parse_nonterminal mdbook-spec/src/grammar/parser.rs /^ fn parse_nonterminal(&mut self) -> Option {$/;" P implementation:Parser +parse_optional mdbook-spec/src/grammar/parser.rs /^ fn parse_optional(&mut self, kind: ExpressionKind) -> Result {$/;" P implementation:Parser +parse_production mdbook-spec/src/grammar/parser.rs /^ fn parse_production(&mut self, category: &str, path: &Path) -> Result {$/;" P implementation:Parser +parse_prose mdbook-spec/src/grammar/parser.rs /^ fn parse_prose(&mut self) -> Result {$/;" P implementation:Parser +parse_repeat mdbook-spec/src/grammar/parser.rs /^ fn parse_repeat(&mut self, kind: ExpressionKind) -> Result {$/;" P implementation:Parser +parse_repeat_plus mdbook-spec/src/grammar/parser.rs /^ fn parse_repeat_plus(&mut self, kind: ExpressionKind) -> Result {$/;" P implementation:Parser +parse_repeat_range mdbook-spec/src/grammar/parser.rs /^ fn parse_repeat_range(&mut self, kind: ExpressionKind) -> Result {$/;" P implementation:Parser +parse_seq mdbook-spec/src/grammar/parser.rs /^ fn parse_seq(&mut self) -> Result> {$/;" P implementation:Parser +parse_suffix mdbook-spec/src/grammar/parser.rs /^ fn parse_suffix(&mut self) -> Result> {$/;" P implementation:Parser +parse_terminal mdbook-spec/src/grammar/parser.rs /^ fn parse_terminal(&mut self) -> Result {$/;" P implementation:Parser +parse_terminal_str mdbook-spec/src/grammar/parser.rs /^ fn parse_terminal_str(&mut self) -> Result {$/;" P implementation:Parser +parse_unicode mdbook-spec/src/grammar/parser.rs /^ fn parse_unicode(&mut self) -> Result {$/;" P implementation:Parser +parser mdbook-spec/src/grammar.rs /^mod parser;$/;" n +path mdbook-spec/src/grammar.rs /^ path: PathBuf,$/;" m struct:Production +path mdbook-spec/src/test_links.rs /^ pub path: String,$/;" m struct:Test +peek mdbook-spec/src/grammar/parser.rs /^ fn peek(&mut self) -> Option {$/;" P implementation:Parser +productions mdbook-spec/src/grammar.rs /^ pub productions: HashMap,$/;" m struct:Grammar +railroad_id mdbook-spec/src/grammar/render_railroad.rs /^pub fn railroad_id(name: &str, for_summary: bool) -> String {$/;" f +range mdbook-spec/src/std_links.rs /^ range: Range,$/;" m struct:Link +relative_url mdbook-spec/src/std_links.rs /^fn relative_url(url: &str, chapter: &Chapter) -> String {$/;" f +remove mdbook-spec/src/grammar.rs /^ fn remove(set: &mut HashSet<&str>, grammar: &Grammar, prod: &Production, root_name: &str) {$/;" f function:check_unexpected_roots +render_markdown mdbook-spec/src/grammar.rs /^mod render_markdown;$/;" n +render_markdown mdbook-spec/src/grammar/render_markdown.rs /^ fn render_markdown(&self, cx: &RenderCtx, output: &mut String) {$/;" P implementation:Characters +render_markdown mdbook-spec/src/grammar/render_markdown.rs /^ fn render_markdown(&self, cx: &RenderCtx, output: &mut String) {$/;" P implementation:Expression +render_markdown mdbook-spec/src/grammar/render_markdown.rs /^ fn render_markdown(&self, cx: &RenderCtx, output: &mut String) {$/;" P implementation:Production +render_markdown mdbook-spec/src/grammar/render_markdown.rs /^ pub fn render_markdown($/;" P implementation:Grammar +render_names mdbook-spec/src/grammar.rs /^fn render_names($/;" f +render_railroad mdbook-spec/src/grammar.rs /^mod render_railroad;$/;" n +render_railroad mdbook-spec/src/grammar/render_railroad.rs /^ fn render_railroad(&self, cx: &RenderCtx) -> Box {$/;" P implementation:Characters +render_railroad mdbook-spec/src/grammar/render_railroad.rs /^ fn render_railroad(&self, cx: &RenderCtx, output: &mut String) {$/;" P implementation:Production +render_railroad mdbook-spec/src/grammar/render_railroad.rs /^ fn render_railroad(&self, cx: &RenderCtx, stack: bool) -> Option> {$/;" P implementation:Expression +render_railroad mdbook-spec/src/grammar/render_railroad.rs /^ pub fn render_railroad($/;" P implementation:Grammar +render_rule_definitions mdbook-spec/src/rules.rs /^ pub fn render_rule_definitions($/;" P implementation:Spec +rr_link_map mdbook-spec/src/grammar.rs /^ rr_link_map: HashMap,$/;" m struct:RenderCtx +rule_link_references mdbook-spec/src/lib.rs /^ fn rule_link_references(&self, chapter: &Chapter, rules: &Rules) -> String {$/;" P implementation:Spec +rules mdbook-spec/src/lib.rs /^mod rules;$/;" n +run mdbook-spec/src/lib.rs /^ fn run(&self, _ctx: &PreprocessorContext, mut book: Book) -> Result {$/;" P implementation:Spec +run_rustdoc mdbook-spec/src/std_links.rs /^fn run_rustdoc($/;" f +rust_root mdbook-spec/src/lib.rs /^ rust_root: Option,$/;" m struct:Spec +set_railroad theme/reference.js /^function set_railroad(newValue) {$/;" f +show_railroad theme/reference.js /^function show_railroad() {$/;" f +space0 mdbook-spec/src/grammar/parser.rs /^ fn space0(&mut self) -> &str {$/;" P implementation:Parser +span.repeat theme/reference.css /^span.repeat {$/;" c +span.repeat::before theme/reference.css /^span.repeat::before {$/;" c +span.version theme/reference.css /^span.version {$/;" c +spec_toggle_tests theme/reference.js /^function spec_toggle_tests(rule_id) {$/;" f +spec_toggle_uncovered theme/reference.js /^function spec_toggle_uncovered(item_index) {$/;" f +std_links mdbook-spec/src/lib.rs /^mod std_links;$/;" n +std_links mdbook-spec/src/std_links.rs /^pub fn std_links(book: &mut Book, diag: &mut Diagnostics) {$/;" f +strip_markdown mdbook-spec/src/grammar/render_railroad.rs /^fn strip_markdown(s: &str) -> String {$/;" f +style_check xtask/src/main.rs /^fn style_check() -> Result<()> {$/;" f +style_error style-check/src/main.rs /^macro_rules! style_error {$/;" M +suffix mdbook-spec/src/grammar.rs /^ suffix: Option,$/;" m struct:Expression +svg.railroad theme/reference.css /^svg.railroad {$/;" c +svg.railroad .debug theme/reference.css /^svg.railroad .debug {$/;" c +svg.railroad .nonterminal text theme/reference.css /^svg.railroad .nonterminal text {$/;" s +svg.railroad g.exceptbox > rect theme/reference.css /^svg.railroad g.exceptbox > rect {$/;" s +svg.railroad g.labeledbox>rect theme/reference.css /^svg.railroad g.labeledbox>rect {$/;" c +svg.railroad path theme/reference.css /^svg.railroad path {$/;" s +svg.railroad rect theme/reference.css /^svg.railroad rect {$/;" s +svg.railroad rect.railroad_canvas theme/reference.css /^svg.railroad rect.railroad_canvas {$/;" c +svg.railroad text theme/reference.css /^svg.railroad text {$/;" s +svg.railroad text.comment theme/reference.css /^svg.railroad text.comment {$/;" c +take_str mdbook-spec/src/grammar/parser.rs /^ fn take_str(&mut self, s: &str) -> bool {$/;" P implementation:Parser +take_while mdbook-spec/src/grammar/parser.rs /^ fn take_while(&mut self, f: &dyn Fn(char) -> bool) -> &str {$/;" P implementation:Parser +test_links mdbook-spec/src/lib.rs /^mod test_links;$/;" n +to_initial_case mdbook-spec/src/admonitions.rs /^fn to_initial_case(s: &str) -> String {$/;" f +toggle_railroad theme/reference.js /^function toggle_railroad() {$/;" f +translate_position mdbook-spec/src/grammar/parser.rs /^fn translate_position(input: &str, index: usize) -> (&str, usize, usize) {$/;" f +translate_tests mdbook-spec/src/grammar/parser.rs /^fn translate_tests() {$/;" f +update_railroad theme/reference.js /^function update_railroad() {$/;" f +var theme/reference.css /^var {$/;" s +var > span theme/reference.css /^var > span {$/;" s +var.optional theme/reference.css /^var.optional {$/;" c +var.type theme/reference.css /^var.type {$/;" c +visit_nt mdbook-spec/src/grammar.rs /^ fn visit_nt(&self, callback: &mut dyn FnMut(&str)) {$/;" P implementation:Expression +visit_nt mdbook-spec/src/grammar.rs /^ fn visit_nt(&self, callback: &mut dyn FnMut(&str)) {$/;" P implementation:Grammar +warn_or_err mdbook-spec/src/lib.rs /^ fn warn_or_err(&mut self, args: fmt::Arguments<'_>) {$/;" P implementation:Diagnostics +warn_or_err mdbook-spec/src/lib.rs /^macro_rules! warn_or_err {$/;" M +width mdbook-spec/src/grammar/render_railroad.rs /^ fn width(&self) -> i64 {$/;" P implementation:Except +x86 (32-bit and 64-bit) src/inline-assembly.md /^##### x86 (32-bit and 64-bit)$/;" T subsubsection:Inline assembly""Rules for naked inline assembly""Directives support""Target specific directive support