File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,15 +49,15 @@ struct Zoo { // wait, what happens here?
49
49
50
50
fn main () {
51
51
let x = " foo" ;
52
- let y = x . zoo (); // won’t compile because `zoo::Zoo` not in scope
52
+ let y = x . zoo ();
53
53
}
54
54
```
55
55
56
56
However, you can see that we’ll hit a problem here, because we define an ambiguous symbol. We have
57
57
two solutions:
58
58
59
59
- Change the name of the ` struct ` to something else.
60
- - Qualified the ` use ` .
60
+ - Qualify the ` use ` .
61
61
62
62
The problem is that if we qualify the ` use ` , what name do we give the trait? We’re not even
63
63
referring to it directly.
@@ -118,7 +118,7 @@ extern crate my_crate as _;
118
118
119
119
This RFC tries to solve a very specific problem (when you * must* alias a trait use). It’s just a
120
120
nit to make the syntax more * “rust-ish”* (it’s very easy to think such a thing would work given the
121
- way ` _ ` works pretty much everywhere else.
121
+ way ` _ ` works pretty much everywhere else) .
122
122
123
123
# Rationale and alternatives
124
124
[ alternatives ] : #alternatives
You can’t perform that action at this time.
0 commit comments