Skip to content

Commit

Permalink
Tag things that have to do with default methods with issue #2794.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuper committed Aug 31, 2012
1 parent 5236a30 commit 6d8d258
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2567,7 +2567,7 @@ fn lookup_discriminant(ccx: @crate_ctxt, vid: ast::def_id) -> ValueRef {
}

// This shouldn't exist. We should cast self *once*, but right now this
// conflicts with default methods.
// conflicts with default methods. (FIXME: #2794)
fn cast_self(cx: block, slf: val_self_data) -> ValueRef {
PointerCast(cx, slf.v, T_ptr(type_of(cx.ccx(), slf.t)))
}
Expand Down
2 changes: 2 additions & 0 deletions src/rustc/middle/typeck/infer/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// call the `super_X(foo, ...)` functions directly, but rather call
// `foo.X(...)`. The implementation of `X()` can then choose to delegate
// to the `super` routine or to do other things.
// (FIXME (#2794): revise this paragraph once default methods in traits
// are working.)
//
// In reality, the sub operation is rather different from lub/glb, but
// they are combined into one trait to avoid duplication (they used to
Expand Down
2 changes: 1 addition & 1 deletion src/rustc/middle/typeck/infer/glb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl Glb: combine {
lattice_tys(&self, a, b)
}

// Traits please:
// Traits please (FIXME: #2794):

fn flds(a: ty::field, b: ty::field) -> cres<ty::field> {
super_flds(&self, a, b)
Expand Down
2 changes: 1 addition & 1 deletion src/rustc/middle/typeck/infer/lub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl Lub: combine {
}
}

// Traits please:
// Traits please (FIXME: #2794):

fn tys(a: ty::t, b: ty::t) -> cres<ty::t> {
lattice_tys(&self, a, b)
Expand Down
2 changes: 1 addition & 1 deletion src/rustc/middle/typeck/infer/sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl Sub: combine {
super_fns(&self, &a_fn_ty, &b_fn_ty)
}

// Traits please:
// Traits please (FIXME: #2794):

fn flds(a: ty::field, b: ty::field) -> cres<ty::field> {
super_flds(&self, a, b)
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/traits-default-method-self.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//xfail-test

// Currently failing with an ICE in trans.
// Currently failing with an ICE in trans. (FIXME: #2794)

trait Cat {
fn meow() -> bool;
Expand Down

0 comments on commit 6d8d258

Please sign in to comment.