Skip to content

Commit fa188f5

Browse files
committed
remove 'existential' from impl trait description
Fixes #73
1 parent 6f563ba commit fa188f5

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/rust-2018/trait-system/impl-trait-for-returning-complex-types-with-ease.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,9 @@ We can now return closures by value, just like any other type!
115115
## More details
116116

117117
The above is all you need to know to get going with `impl Trait`, but for
118-
some more nitty-gritty details: type parameters and `impl Trait` in argument
119-
position are universals (universally quantified types). Meanwhile, `impl
120-
Trait` in return position are existentials (existentially quantified types).
121-
Okay, maybe that's a bit too jargon-heavy. Let's step back.
122-
123-
Consider this function:
118+
some more nitty-gritty details: type parameters and `impl Trait` work
119+
slightly differently when they're in argument position versus return
120+
position. Consider this function:
124121

125122
```rust,ignore
126123
fn foo<T: Trait>(x: T) {
@@ -157,10 +154,9 @@ type... anyway, you can see how `F` is in the return position here. So you
157154
have the ability to choose.
158155

159156
With `impl Trait`, you're saying "hey, some type exists that implements this
160-
trait, but I'm not gonna tell you what it is." ("existential" in the jargon,
161-
"some type exists"). So now, the caller can't choose, and the function itself
162-
gets to choose. If we tried to define parse with `Result<impl F,...` as the
163-
return type, it wouldn't work.
157+
trait, but I'm not gonna tell you what it is.". So now, the caller can't
158+
choose, and the function itself gets to choose. If we tried to define parse
159+
with `Result<impl F,...` as the return type, it wouldn't work.
164160

165161
### Using `impl Trait` in more places
166162

0 commit comments

Comments
 (0)