-
-
Save zwarich/8d67756efd985fa9b216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc/middle/typeck/variance.rs b/src/librustc/middle/typeck/variance.rs | |
index a65aa04..9c1a607 100644 | |
--- a/src/librustc/middle/typeck/variance.rs | |
+++ b/src/librustc/middle/typeck/variance.rs | |
@@ -1008,7 +1008,10 @@ impl<'a> SolveContext<'a> { | |
while index < num_inferred && | |
inferred_infos.get(index).item_id == item_id { | |
let info = inferred_infos.get(index); | |
- let variance = *solutions.get(index); | |
+ let variance = match *solutions.get(index) { | |
+ ty::Covariant => ty::Invariant, | |
+ v @ _ => v, | |
+ }; | |
debug!("Index {} Info {} / {} / {} Variance {}", | |
index, info.index, info.kind, info.space, variance); | |
match info.kind { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment