Skip to content

Commit d7c57e1

Browse files
committed
Rollup merge of rust-lang#31222 - durka:patch-15, r=steveklabnik
r? @steveklabnik
2 parents 3e56732 + 2f633b2 commit d7c57e1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/doc/book/syntax-index.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Keywords
44

5-
* `as`: primitive casting. See [Casting Between Types (`as`)].
5+
* `as`: primitive casting, or disambiguating the specific trait containing an item. See [Casting Between Types (`as`)], [Universal Function Call Syntax (Angle-bracket Form)], [Associated Types].
66
* `break`: break out of loop. See [Loops (Ending Iteration Early)].
77
* `const`: constant items and constant raw pointers. See [`const` and `static`], [Raw Pointers].
88
* `continue`: continue to next loop iteration. See [Loops (Ending Iteration Early)].
@@ -115,8 +115,11 @@
115115
* `::path`: path relative to the crate root (*i.e.* an explicitly absolute path). See [Crates and Modules (Re-exporting with `pub use`)].
116116
* `self::path`: path relative to the current module (*i.e.* an explicitly relative path). See [Crates and Modules (Re-exporting with `pub use`)].
117117
* `super::path`: path relative to the parent of the current module. See [Crates and Modules (Re-exporting with `pub use`)].
118-
* `type::ident`: associated constants, functions, and types. See [Associated Types].
118+
* `type::ident`, `<type as trait>::ident`: associated constants, functions, and types. See [Associated Types].
119119
* `<type>::…`: associated item for a type which cannot be directly named (*e.g.* `<&T>::…`, `<[T]>::…`, *etc.*). See [Associated Types].
120+
* `trait::method(…)`: disambiguating a method call by naming the trait which defines it. See [Universal Function Call Syntax].
121+
* `type::method(…)`: disambiguating a method call by naming the type for which it's defined. See [Universal Function Call Syntax].
122+
* `<type as trait>::method(…)`: disambiguating a method call by naming the trait _and_ type. See [Universal Function Call Syntax (Angle-bracket Form)].
120123

121124
<!-- Generics -->
122125

@@ -235,6 +238,8 @@
235238
[Traits (`where` clause)]: traits.html#where-clause
236239
[Traits (Multiple Trait Bounds)]: traits.html#multiple-trait-bounds
237240
[Traits]: traits.html
241+
[Universal Function Call Syntax]: ufcs.html
242+
[Universal Function Call Syntax (Angle-bracket Form)]: ufcs.html#angle-bracket-form
238243
[Unsafe]: unsafe.html
239244
[Unsized Types (`?Sized`)]: unsized-types.html#sized
240245
[Variable Bindings]: variable-bindings.html

0 commit comments

Comments
 (0)