Suggest returning a reference for unsized place from a closure#152162
Conversation
|
rustbot has assigned @petrochenkov. Use |
This comment has been minimized.
This comment has been minimized.
882fe19 to
cb75047
Compare
This comment has been minimized.
This comment has been minimized.
|
I haven't tested this, but from reading your patch, it looks like this will be very helpful to the next newbie after me. Thank you so much for picking this up! |
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
cb75047 to
b4469fc
Compare
This comment has been minimized.
This comment has been minimized.
b4469fc to
d153f44
Compare
This comment has been minimized.
This comment has been minimized.
d153f44 to
f34db2f
Compare
|
@bors r+ |
…ed-closure-return, r=petrochenkov Suggest returning a reference for unsized place from a closure Fixes rust-lang#152064 There are 3 similar note: `the size for values of type str cannot be known at compilation time` for different spans, maybe need more work to remove some of them. This PR only adds a suggestion for using a reference.
|
This pull request was unapproved. This PR was contained in a rollup (#154952), which was unapproved. |
f34db2f to
eedf870
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
|
@bors r+ |
…ed-closure-return, r=petrochenkov Suggest returning a reference for unsized place from a closure Fixes rust-lang#152064 There are 3 similar note: `the size for values of type str cannot be known at compilation time` for different spans, maybe need more work to remove some of them. This PR only adds a suggestion for using a reference.
…uwer Rollup of 7 pull requests Successful merges: - #155556 (`rust-analyzer` subtree update) - #152162 (Suggest returning a reference for unsized place from a closure) - #155389 (Simplify macros for target-modifier and mitigation flags) - #155553 (miri subtree update) - #153546 (tests/ui/extern: add annotations for reference rules) - #155475 (Make reparsed guard metavars collect tokens) - #155560 (Remove `AttributeLintKind` variants - part 4)
…uwer Rollup of 7 pull requests Successful merges: - rust-lang/rust#155556 (`rust-analyzer` subtree update) - rust-lang/rust#152162 (Suggest returning a reference for unsized place from a closure) - rust-lang/rust#155389 (Simplify macros for target-modifier and mitigation flags) - rust-lang/rust#155553 (miri subtree update) - rust-lang/rust#153546 (tests/ui/extern: add annotations for reference rules) - rust-lang/rust#155475 (Make reparsed guard metavars collect tokens) - rust-lang/rust#155560 (Remove `AttributeLintKind` variants - part 4)
Fixes #152064
There are 3 similar note:
the size for values of type str cannot be known at compilation timefor different spans, maybe need more work to remove some of them.
This PR only adds a suggestion for using a reference.