rust/src/librustc/middle/traits
bors 6ee56c9a5f auto merge of #18688 : bkoropoff/rust/unboxed-closure-subst-fixes, r=nikomatsakis
This resolves some issues that remained after adding support for monomorphizing unboxed closures in trans.

There were a few places where a set of substitutions for an unboxed closure type were dropped on the floor and later recalculated from scratch based on the def ID, but this failed spectacularly when the closure originated from a different param environment.  The substitutions are now plumbed through end-to-end.  Closes #18661

There was also a conflict in the meaning of the self param space within the body of the unboxed closure.  Trans attempted to insert the unboxed closure type as the self type, but this could conflict with the self type from the param environment when an unboxed closure was used within a default method on a trait.  Since the body of an unboxed closure cannot refer to its own self type or value, there's no need for it to actually use the self space.  The downstream consumers of the substitutions in trans do not seem to need it either since they look up the type of the closure some other way, so I just stopped setting it.  Closes #18685.

r? @pcwalton @nikomatsakis
2014-11-07 20:41:29 +00:00
..
coherence.rs Partial fix for #17901: Be less conservative around unbound type 2014-11-05 22:01:30 -05:00
doc.rs Use type-safe wrapper for TypeFlags 2014-10-24 10:20:02 -04:00
fulfill.rs Avoid O(n^2) performance by reconsidering the full set of obligations only when we are about to report an error (#18208). I found it is still important to consider the full set in order to make tests like let x: Vec<_> = obligations.iter().collect() work. 2014-10-28 08:18:21 -04:00
mod.rs Fix handling of unboxed closure type param substitutions 2014-11-06 18:17:57 -08:00
select.rs auto merge of #18688 : bkoropoff/rust/unboxed-closure-subst-fixes, r=nikomatsakis 2014-11-07 20:41:29 +00:00
util.rs Fix handling of unboxed closure type param substitutions 2014-11-06 18:17:57 -08:00