@@ -25,8 +25,8 @@ let name: &'static str = (|| "Rust")();
25
25
26
26
## Disambiguating Function Calls
27
27
28
- Rust treats all function calls as sugar for a more explicit, fully-qualified
29
- syntax. Upon compilation, Rust will desugar all function calls into the explicit
28
+ Rust treats all function calls as sugar for a more explicit, [ fully-qualified
29
+ syntax] . Upon compilation, Rust will desugar all function calls into the explicit
30
30
form. Rust may sometimes require you to qualify function calls with trait,
31
31
depending on the ambiguity of a call in light of in-scope items.
32
32
@@ -42,8 +42,8 @@ referent of method or associated function calls. These situations may include:
42
42
* Multiple in-scope traits define methods with the same name for the same types
43
43
* Auto-` deref ` is undesirable; for example, distinguishing between methods on a
44
44
smart pointer itself and the pointer's referent
45
- * Methods which take no arguments, like ` default() ` , and return properties of a
46
- type, like ` size_of() `
45
+ * Methods which take no arguments, like [ ` default() ` ] , and return properties of a
46
+ type, like [ ` size_of() ` ]
47
47
48
48
To resolve the ambiguity, the programmer may refer to their desired method or
49
49
function using more specific paths, types, or traits.
@@ -93,9 +93,11 @@ fn main() {
93
93
94
94
Refer to [ RFC 132] for further details and motivations.
95
95
96
- [ `std::ops::Fn` ] : ../../std/ops/trait.Fn.html
97
- [ `std::ops::FnMut` ] : ../../std/ops/trait.FnMut.html
98
- [ `std::ops::FnOnce` ] : ../../std/ops/trait.FnOnce.html
99
96
[ RFC 132 ] : https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
100
-
101
97
[ _Expression_ ] : ../expressions.md
98
+ [ `default()` ] : ../../std/default/trait.Default.html#tymethod.default
99
+ [ `size_of()` ] : ../../std/mem/fn.size_of.html
100
+ [ `std::ops::FnMut` ] : ../../std/ops/trait.FnMut.html
101
+ [ `std::ops::FnOnce` ] : ../../std/ops/trait.FnOnce.html
102
+ [ `std::ops::Fn` ] : ../../std/ops/trait.Fn.html
103
+ [ fully-qualified syntax ] : ../paths.md#qualified-paths
0 commit comments