mirror of https://github.com/rust-lang/reference
fix example code in impl docs
This commit is contained in:
parent
47b54b5f1f
commit
5f49f2d882
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue