Infer variance of types with respect to the region parameter.

A similar approach could be used for type parameters.

Fixes #2282.
This commit is contained in:
Niko Matsakis
2012-08-09 09:59:50 -07:00
parent 8185ede1fa
commit 511e7626ae
33 changed files with 720 additions and 232 deletions

View File

@@ -770,6 +770,7 @@ enum AncestorList = option<unsafe::Exclusive<AncestorNode>>;
fn access_group<U>(x: &TaskGroupArc, blk: fn(TaskGroupInner) -> U) -> U {
unsafe { x.with(blk) }
}
#[inline(always)]
fn access_ancestors<U>(x: &unsafe::Exclusive<AncestorNode>,
blk: fn(x: &mut AncestorNode) -> U) -> U {