Skip to content

Commit aa1fc1f

Browse files
committed
Emphasize effect of subtyping rules
1 parent 359a182 commit aa1fc1f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

active/0000-higher-ranked-trait-bounds.md

+6
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ referred to
245245
[Simon Peyton-Jones rather thorough but quite readable paper on the topic][spj]
246246
or the documentation in
247247
`src/librustc/middle/typeck/infer/region_inference/doc.rs`.
248+
249+
The most important point is that the rules provide for subtyping that
250+
goes from "more general" to "less general". For example, if I have a
251+
trait reference like `for<'a> FnMut(&'a int)`, that would be usable
252+
wherever a trait reference with a concrete lifetime, like
253+
`FnMut(&'static int)`, is expected.
248254

249255
[spj]: http://research.microsoft.com/en-us/um/people/simonpj/papers/higher-rank/
250256

0 commit comments

Comments
 (0)