Skip to content

Commit 9de7a9a

Browse files
committed
Expand comment in replace_types
1 parent 41519f3 commit 9de7a9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_utils/src/ty/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,9 @@ fn replace_types<'tcx>(
16241624
deque.push_back((param_ty, new_ty));
16251625

16261626
while let Some((param_ty, new_ty)) = deque.pop_front() {
1627-
// If `replaced.is_empty()`, then `param_ty` and `new_ty` are those initially passed in.
1627+
// If `replaced.is_empty()`, then `param_ty` and `new_ty` are those initially passed in. Note that
1628+
// the types the `all` iterates over include the output type. Thus, if replacing `param_ty` with
1629+
// `new_ty` would change the output type, this check will fail.
16281630
if !fn_sig
16291631
.inputs_and_output
16301632
.iter()

0 commit comments

Comments
 (0)