Skip to content

Commit 94862c6

Browse files
committed
Correct comments about unsizing regarding #40319.
1 parent 141265d commit 94862c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/traits/select.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2596,8 +2596,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
25962596
let inner_source = field.subst(tcx, substs_a);
25972597
let inner_target = field.subst(tcx, substs_b);
25982598

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

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

0 commit comments

Comments
 (0)