fix example code in impl docs

This commit is contained in:
Eric Egli 2023-05-17 08:25:40 +02:00 committed by GitHub
parent 47b54b5f1f
commit 5f49f2d882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -98,6 +98,7 @@ The function:
```rust,ignore
fn foo<T: Trait>() -> T {
}
```
allows the caller to determine the return type, `T`, and the function returns that type.
@ -106,6 +107,7 @@ The function:
```rust,ignore
fn foo() -> impl Trait {
}
```
doesn't allow the caller to determine the return type.