Skip to content

Commit 5b74438

Browse files
committed
add comment about subtyping
1 parent eeb8c8d commit 5b74438

File tree

1 file changed

+4
-0
lines changed
  • src/librustc_typeck/check

1 file changed

+4
-0
lines changed

src/librustc_typeck/check/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2744,6 +2744,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
27442744
);
27452745
match self_ty.sty {
27462746
ty::Infer(ty::TyVar(found_vid)) => {
2747+
// FIXME: consider using `sub_root_var` here so we
2748+
// can see through subtyping.
27472749
let found_vid = self.root_var(found_vid);
27482750
debug!("self_type_matches_expected_vid - found_vid={:?}", found_vid);
27492751
expected_vid == found_vid
@@ -2756,6 +2758,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
27562758
-> impl Iterator<Item=(ty::PolyTraitRef<'tcx>, traits::PredicateObligation<'tcx>)>
27572759
+ Captures<'gcx> + 'b
27582760
{
2761+
// FIXME: consider using `sub_root_var` here so we
2762+
// can see through subtyping.
27592763
let ty_var_root = self.root_var(self_ty);
27602764
debug!("obligations_for_self_ty: self_ty={:?} ty_var_root={:?} pending_obligations={:?}",
27612765
self_ty, ty_var_root,

0 commit comments

Comments
 (0)