We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bf38b2 commit c662a9aCopy full SHA for c662a9a
src/librustc/middle/typeck/check/method.rs
@@ -282,8 +282,9 @@ impl LookupContext {
282
ty_self => {
283
// Call is of the form "self.foo()" and appears in one
284
// of a trait's default method implementations.
285
- let self_did = self.fcx.self_impl_def_id.expect(
286
- ~"unexpected `none` for self_impl_def_id");
+ let self_did = self.fcx.self_info.expect(
+ ~"self_impl_def_id is undefined (`self` may not \
287
+ be in scope here").def_id;
288
let substs = {self_r: None, self_ty: None, tps: ~[]};
289
self.push_inherent_candidates_from_self(
290
self_ty, self_did, &substs);
0 commit comments