Skip to content

Commit 1fe43a5

Browse files
committed
Correct comments about unsizing regarding #40319.
1 parent d0e1ba7 commit 1fe43a5

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
@@ -2593,8 +2593,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
25932593
let inner_source = field.subst(tcx, substs_a);
25942594
let inner_target = field.subst(tcx, substs_b);
25952595

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

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

0 commit comments

Comments
 (0)