File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -185,17 +185,25 @@ Another example:
185
185
``` rust,ignore
186
186
fn foo<'a>(_: &'a usize)
187
187
```
188
- This function claims that there is some lifetime ` 'a ` (determined by the
189
- caller) such that it is well-typed: ` ∃ 'a: well_typed(foo)` .
188
+ This function claims that for any lifetime ` 'a ` (determined by the
189
+ caller), it is well-typed: ` ∀ 'a: well_typed(foo)` .
190
190
191
- One more example:
191
+ Another example:
192
192
193
193
``` rust,ignore
194
194
fn foo<F>()
195
- where for<'a> F: Fn(&'a u8),
195
+ where for<'a> F: Fn(&'a u8)
196
+ ```
197
+ This function claims that it is well-typed for all types ` F ` such that for all
198
+ lifetimes ` 'a ` , ` F: Fn(&'a u8) ` : ` ∀ F: ∀ 'a: (F: Fn(&'a u8)) => well_typed(foo) ` .
199
+
200
+ One more example:
201
+
202
+ ``` rust,ignore
203
+ fn foo(_: dyn Debug)
196
204
```
197
- This function claims that for all lifetimes ` 'a ` and types ` F ` satisfying the
198
- bound, it is well-typed: ` ∀ F, 'a: (F: Fn(&'a u8)) => well_typed(foo)` .
205
+ This function claims that there exists some type ` T ` that implements ` Debug `
206
+ such that the function is well-typed: ` ∃ T: (T: Debug) and well_typed(foo)` .
199
207
200
208
<a name =" variance " ></a >
201
209
You can’t perform that action at this time.
0 commit comments