Skip to content

Commit

Permalink
Correct comments about unsizing regarding #40319.
Browse files Browse the repository at this point in the history
  • Loading branch information
qnighy committed Jun 29, 2017
1 parent 141265d commit 94862c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2596,8 +2596,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
let inner_source = field.subst(tcx, substs_a);
let inner_target = field.subst(tcx, substs_b);

// Check that the source structure with the target's
// type parameters is a subtype of the target.
// Check that the source struct with the target's
// unsized parameters is equal to the target.
let params = substs_a.iter().enumerate().map(|(i, &k)| {
if ty_params.contains(i) {
Kind::from(substs_b.type_at(i))
Expand Down Expand Up @@ -2635,7 +2635,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
let b_last = tys_b.last().unwrap();

// Check that the source tuple with the target's
// last element is a subtype of the target.
// last element is equal to the target.
let new_tuple = tcx.mk_tup(a_mid.iter().chain(Some(b_last)), false);
let InferOk { obligations, .. } =
self.infcx.at(&obligation.cause, obligation.param_env)
Expand Down

0 comments on commit 94862c6

Please sign in to comment.