about summary refs log tree commit diff
path: root/tests/ui/moves/auxiliary
AgeCommit message (Collapse)AuthorLines
2024-12-24Fix some typosfudancoder-1/+1
Signed-off-by: fudancoder <fudancoder@icloud.com.>
2024-11-13Suggest borrowing arguments in generic positions when trait bounds are satisfieddianne-15/+12
This subsumes the suggestions to borrow arguments with `AsRef`/`Borrow` bounds and those to borrow arguments with `Fn` and `FnMut` bounds. It works for other traits implemented on references as well, such as `std::io::Read`, `std::io::Write`, and `core::fmt::Write`. Incidentally, by making the logic for suggesting borrowing closures general, this removes some spurious suggestions to mutably borrow `FnMut` closures in assignments, as well as an unhelpful suggestion to add a `Clone` constraint to an `impl Fn` argument.
2024-11-13Provide borrow-instead-of-move suggestions for calls of fn-like items from ↵dianne-0/+23
other crates This also downgrades its applicability to MaybeIncorrect. Its suggestion can result in ill-typed code when the type parameter it suggests providing a different generic argument for appears elsewhere in the callee's signature or predicates.