Start removing snippet_opt in favor of get_source_text#13244
Start removing snippet_opt in favor of get_source_text#13244bors merged 1 commit intorust-lang:masterfrom
snippet_opt in favor of get_source_text#13244Conversation
|
r? @Alexendoo rustbot has assigned @Alexendoo. Use |
Remove more `snippet_opt` calls First commit is the same as #13244 changelog: none
clippy_lints/src/from_over_into.rs
Outdated
| let from = from.as_str(); | ||
| let into = into.as_str(); |
There was a problem hiding this comment.
These look like they'd be unneeded
| e.span, | ||
| "if you would like to reborrow, try removing `&*`", | ||
| snippet_opt(cx, deref_target.span).unwrap(), | ||
| deref_text.as_str(), |
There was a problem hiding this comment.
Can we impl the Into<DiagnosticThingy> to pass this as is? I think this will come up a bunch
There was a problem hiding this comment.
span_suggestion only requires ToString. deref_text is used right afterwards so it doesn't help here.
There was a problem hiding this comment.
Ahh yeah, was thinking of the wrong arg 🤦♂️
9f020d8 to
ac25730
Compare
ac25730 to
8a4c34a
Compare
|
Thanks! @bors r+ |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Continuing the job of removing unnecessary allocations.
changelog: none