1- # Paths
2-
31r[ paths]
2+ # Paths
43
54r[ paths.intro]
65A * path* is a sequence of one or more path segments separated by ` :: ` tokens.
@@ -16,9 +15,8 @@ x::y::z;
1615
1716## Types of paths
1817
19- ### Simple Paths
20-
2118r[ paths.simple]
19+ ### Simple Paths
2220
2321r[ paths.simple.syntax]
2422> ** <sup >Syntax</sup >** \
@@ -40,9 +38,8 @@ mod m {
4038}
4139```
4240
43- ### Paths in expressions
44-
4541r[ paths.expr]
42+ ### Paths in expressions
4643
4744r[ paths.expr.syntax]
4845> ** <sup >Syntax</sup >** \
@@ -99,9 +96,8 @@ r[paths.expr.impl-trait-params]
9996The synthetic type parameters corresponding to ` impl Trait ` types are implicit,
10097and these cannot be explicitly specified.
10198
102- ## Qualified paths
103-
10499r[ paths.qualified]
100+ ## Qualified paths
105101
106102r[ paths.qualified.syntax]
107103> ** <sup >Syntax</sup >** \
@@ -137,9 +133,8 @@ S::f(); // Calls the inherent impl.
137133<S as T2 >:: f (); // Calls the T2 trait function.
138134```
139135
140- ### Paths in types
141-
142136r[ paths.type]
137+ ### Paths in types
143138
144139r[ paths.type.syntax]
145140> ** <sup >Syntax</sup >** \
@@ -179,16 +174,14 @@ fn i<'a>() -> impl Iterator<Item = ops::Example<'a>> {
179174type G = std :: boxed :: Box <dyn std :: ops :: FnOnce (isize ) -> isize >;
180175```
181176
182- ## Path qualifiers
183-
184177r[ paths.qualifiers]
178+ ## Path qualifiers
185179
186180Paths can be denoted with various leading qualifiers to change the meaning of
187181how it is resolved.
188182
189- ### ` :: `
190-
191183r[ paths.qualifiers.global-root]
184+ ### ` :: `
192185
193186r[ paths.qualifiers.global-root.intro]
194187Paths starting with ` :: ` are considered to be * global paths* where the segments of the path
@@ -227,9 +220,8 @@ mod b {
227220# fn main() {}
228221```
229222
230- ### ` self `
231-
232223r[ paths.qualifiers.mod-self]
224+ ### ` self `
233225
234226r[ paths.qualifiers.mod-self.intro]
235227` self ` resolves the path relative to the current module.
@@ -254,9 +246,8 @@ impl S {
254246# fn main () {}
255247```
256248
257- ### ` Self `
258-
259249r[ paths.qualifiers.type-self]
250+ ### ` Self `
260251
261252r[ paths.qualifiers.type-self.intro]
262253` Self ` , with a capital "S", is used to refer to the current type being implemented or defined. It may be used in the following situations:
@@ -319,9 +310,8 @@ struct NonEmptyList<T> {
319310}
320311```
321312
322- ### ` super `
323-
324313r[ paths.qualifiers.super]
314+ ### ` super `
325315
326316r[ paths.qualifiers.super.intro]
327317` super ` in a path resolves to the parent module.
@@ -361,9 +351,8 @@ mod a {
361351# fn main () {}
362352```
363353
364- ### ` crate `
365-
366354r[ paths.qualifiers.crate]
355+ ### ` crate `
367356
368357r[ paths.qualifiers.crate.intro]
369358` crate ` resolves the path relative to the current crate.
@@ -381,9 +370,8 @@ mod a {
381370# fn main () {}
382371```
383372
384- ### ` $crate `
385-
386373r[ paths.qualifiers.macro-crate]
374+ ### ` $crate `
387375
388376r[ paths.qualifiers.macro-crate.allowed-positions]
389377` $crate ` is only used within [ macro transcribers] , and can only be used as the first
@@ -406,9 +394,8 @@ macro_rules! inc {
406394# fn main () { }
407395```
408396
409- ## Canonical paths
410-
411397r[ paths.canonical]
398+ ## Canonical paths
412399
413400r[ paths.canonical.intro]
414401Items defined in a module or implementation have a * canonical path* that
0 commit comments