Skip to content

Commit a5e274b

Browse files
adetaylormadsmtm
andauthored
Update text/3519-arbitrary-self-types-v2.md
Co-authored-by: Mads Marquart <[email protected]>
1 parent 9c59366 commit a5e274b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/3519-arbitrary-self-types-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Specifically, instead of using the list of candidate types assembled using the `
248248

249249
It's particularly important to emphasize that the list of candidate receiver types _does not change_ - that's still assembled using the `Deref` trait just as now. But, a wider set of locations is searched for methods with those receiver types.
250250

251-
For instance, `Weak<T>` implements `Receiver` but not `Deref`. Imagine you have `let t: Weak<SomeStruct> = /* obtain */; t.some_method();`. We will now search `impl SomeStruct {}` blocks for an implementation of `fn some_method(self: Weak<SomeStruct>)`, `fn some_method(self: &Weak<SomeStruct>)`, etc. The possible self types are unchanged - they're still obtained by searching the `Deref` chain for `t` - but we'll look in more places for methods with those valid `self` types.
251+
For instance, `Weak<T>` implements `Receiver` but not `Deref`. Imagine you have `let t: Weak<SomeStruct> = /* obtain */; t.some_method();`. We will now search `impl SomeStruct {}` blocks for an implementation of `fn some_method(self: Weak<SomeStruct>)`, `fn some_method(self: &Weak<SomeStruct>)`, etc. The possible self types in the method call expression are unchanged - they're still obtained by searching the `Deref` chain for `t` - but we'll look in more places for methods with those valid `self` types.
252252

253253
## Compiler changes: deshadowing
254254
[compiler-changes-deshadowing]: #compiler-changes-deshadowing

0 commit comments

Comments
 (0)