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 6ee682f commit dc97696Copy full SHA for dc97696
clippy_utils/src/ty/mod.rs
@@ -1577,7 +1577,9 @@ fn replace_types<'tcx>(
1577
deque.push_back((param_ty, new_ty));
1578
1579
while let Some((param_ty, new_ty)) = deque.pop_front() {
1580
- // 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
1581
+ // the types the `all` iterates over include the output type. Thus, if replacing `param_ty` with
1582
+ // `new_ty` would change the output type, this check will fail.
1583
if !fn_sig
1584
.inputs_and_output
1585
.iter()
0 commit comments