1
Fork 0

Improve a typeck ICE message (slightly)

This commit is contained in:
Tim Chevalier 2013-01-07 16:11:51 -08:00
parent 8bf38b26ee
commit c662a9aad7

View file

@ -282,8 +282,9 @@ impl LookupContext {
ty_self => { ty_self => {
// Call is of the form "self.foo()" and appears in one // Call is of the form "self.foo()" and appears in one
// of a trait's default method implementations. // of a trait's default method implementations.
let self_did = self.fcx.self_impl_def_id.expect( let self_did = self.fcx.self_info.expect(
~"unexpected `none` for self_impl_def_id"); ~"self_impl_def_id is undefined (`self` may not \
be in scope here").def_id;
let substs = {self_r: None, self_ty: None, tps: ~[]}; let substs = {self_r: None, self_ty: None, tps: ~[]};
self.push_inherent_candidates_from_self( self.push_inherent_candidates_from_self(
self_ty, self_did, &substs); self_ty, self_did, &substs);