We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
replace_types
1 parent 5739e72 commit 07574c1Copy full SHA for 07574c1
clippy_utils/src/ty/mod.rs
@@ -1642,7 +1642,9 @@ fn replace_types<'tcx>(
1642
deque.push_back((param_ty, new_ty));
1643
1644
while let Some((param_ty, new_ty)) = deque.pop_front() {
1645
- // If `replaced.is_empty()`, then `param_ty` and `new_ty` are those initially passed in.
+ // If `replaced.is_empty()`, then `param_ty` and `new_ty` are those initially passed in. Note that
1646
+ // the types the `all` iterates over include the output type. Thus, if replacing `param_ty` with
1647
+ // `new_ty` would change the output type, this check will fail.
1648
if !fn_sig
1649
.inputs_and_output
1650
.iter()
0 commit comments