Skip to content

Commit 80f1b44

Browse files
committed
Clarify that provided methods work too
1 parent 6adfb20 commit 80f1b44

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

text/0000-return-position-impl-trait-in-traits.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ impl NewIntoIterator for Vec<u32> {
179179
}
180180
```
181181

182+
The desugaring works the same for provided methods of traits.
183+
182184
## Scoping rules for generic parameters
183185

184186
We say a generic parameter is "in scope" for an `impl Trait` type if the actual revealed type is allowed to name that parameter. The scoping rules for return position `impl Trait` in traits are the same as [those for return position `impl Trait` generally][scoping]: All type and const parameters are considered in-scope, while lifetime parameters are only considered in-scope if they are mentioned in the `impl Trait` type directly.

0 commit comments

Comments
 (0)