You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ICE: rust: task failed at 'Assertion fcx.locals.contains_key(nid) failed', #3021
impls, like other items, are certainly not supposed to refer to upvars. I think this constraint is enforced in resolve for nested fns---seems like resolve ought to enforce a similar constraint for impls etc.
I understand what the bug is: resolve was resolving impl methods with a NormalRibKind rather than an OpaqueFunctionRibKind. Fixing that fixed the test case, but then I realized the behavior should be the same for classes and traits (which is currently isn't). That's a problem because the obvious fix stops class methods from being able to refer to their class-bound ty params.
Resolve is doing something weird with def_ids for def_ty_params... so I'm still working on this.
Activity
catamorphism commentedon Jul 25, 2012
I'll take a look at this.
catamorphism commentedon Jul 25, 2012
FYI, I reproduced this with incoming. I'll investigate further.
catamorphism commentedon Jul 25, 2012
A more minimal example that pokes the same bug:
If I comment out the body of the
resetmethod, it works. It seems that methods in nested impls can't refer to upvars, but I'll keep looking.nikomatsakis commentedon Jul 25, 2012
impls, like other items, are certainly not supposed to refer to upvars. I think this constraint is enforced in resolve for nested fns---seems like resolve ought to enforce a similar constraint for impls etc.
catamorphism commentedon Jul 25, 2012
Ok, I'll look at why resolve isn't doing that, then.
catamorphism commentedon Jul 26, 2012
I understand what the bug is: resolve was resolving impl methods with a
NormalRibKindrather than anOpaqueFunctionRibKind. Fixing that fixed the test case, but then I realized the behavior should be the same for classes and traits (which is currently isn't). That's a problem because the obvious fix stops class methods from being able to refer to their class-bound ty params.Resolve is doing something weird with def_ids for
def_ty_params... so I'm still working on this.graydon commentedon Jul 26, 2012
Fwiw siphash itself arrived in libcore yesterday.
catamorphism commentedon Jul 28, 2012
Fixed in a0d0584
Auto merge of rust-lang#3021 - ttsugriy:bin-search, r=RalfJung
Merge pull request rust-lang#3021 from rust-lang/tshepang-patch-1