]> git.lizzy.rs Git - rust.git/commit
auto merge of #19011 : ricky26/rust/trait_supertraits, r=nikomatsakis
authorbors <bors@rust-lang.org>
Tue, 25 Nov 2014 22:36:59 +0000 (22:36 +0000)
committerbors <bors@rust-lang.org>
Tue, 25 Nov 2014 22:36:59 +0000 (22:36 +0000)
commiteedfc077964b811315589d9a70293d3ff2eb0e1d
tree3202a12380087f0b09f8483f539dd0617501546e
parent689ef2dabfa3b2b379c953e5fb68ce2c805c2231
parent729bf447ab51887a8775ebc544b51f5549424b73
auto merge of #19011 : ricky26/rust/trait_supertraits, r=nikomatsakis

It looks like currently kinds required by traits are not propagated when they are wrapped in a TyTrait. Additionally, in SelectionContext::builtin_bound, no attempt is made to check whether the target trait or its supertraits require the kind specified.

This PR alters SelectionContext::builtin_bound to examine all supertraits in the target trait's bounds recursively for required kinds.

Alternatively, the kinds could be added to the TyTrait upon creation (by just setting its builtin_bounds to the union of the bounds requested in this instance and the bounds required by the trait), this option may have less overhead during compilation but information is lost about which kinds were explicitly requested for this instance (vs those specified by traits/supertraits) would be lost.