Skip to content

Commit 5f49f2d

Browse files
authored
fix example code in impl docs
1 parent 47b54b5 commit 5f49f2d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/types/impl-trait.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ The function:
9898

9999
```rust,ignore
100100
fn foo<T: Trait>() -> T {
101+
}
101102
```
102103

103104
allows the caller to determine the return type, `T`, and the function returns that type.
@@ -106,6 +107,7 @@ The function:
106107

107108
```rust,ignore
108109
fn foo() -> impl Trait {
110+
}
109111
```
110112

111113
doesn't allow the caller to determine the return type.

0 commit comments

Comments
 (0)