-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak borrow suggestion span #110504
Tweak borrow suggestion span #110504
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Could you completely remove the span_to_snippet call by making the suggestion multipart? |
I could, but that would require a bit more work, since this function currently has a very strange API:
I guess I'll look into it. |
@bors r+ |
🌲 The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened. |
… r=cjgillot Tweak borrow suggestion span Avoids a `span_to_snippet` call when we don't need to surround the expression in parentheses. The fact that the suggestion was using the whole span of the expression rather than just appending a `&` was prevented me from using `// run-rustfix` in another PR (rust-lang#110432 (comment)). Also some drive-by renames of functions that have been annoying me for a bit.
… r=cjgillot Tweak borrow suggestion span Avoids a `span_to_snippet` call when we don't need to surround the expression in parentheses. The fact that the suggestion was using the whole span of the expression rather than just appending a `&` was prevented me from using `// run-rustfix` in another PR (rust-lang#110432 (comment)). Also some drive-by renames of functions that have been annoying me for a bit.
@bors r- needs rebase I guess |
cf24419
to
f0e7af4
Compare
rebased @bors r=cjgillot |
… r=cjgillot Tweak borrow suggestion span Avoids a `span_to_snippet` call when we don't need to surround the expression in parentheses. The fact that the suggestion was using the whole span of the expression rather than just appending a `&` was prevented me from using `// run-rustfix` in another PR (rust-lang#110432 (comment)). Also some drive-by renames of functions that have been annoying me for a bit.
☔ The latest upstream changes (presumably #110579) made this pull request unmergeable. Please resolve the merge conflicts. |
We really shouldn't be naming functions `fn check_*` unless they're doing *typechecking*. It's especially misleading when we're doing this inside of HIR typeck.
f0e7af4
to
4731a25
Compare
rebased again @bors r=cjgillot |
Rollup of 7 pull requests Successful merges: - rust-lang#110304 (Add GNU Property Note) - rust-lang#110504 (Tweak borrow suggestion span) - rust-lang#110583 (tweak "make mut" spans when assigning to locals) - rust-lang#110694 (Implement builtin # syntax and use it for offset_of!(...)) - rust-lang#111120 (Suggest let for possible binding with ty) - rust-lang#111252 (Min specialization improvements) - rust-lang#111361 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Avoids a
span_to_snippet
call when we don't need to surround the expression in parentheses. The fact that the suggestion was using the whole span of the expression rather than just appending a&
was prevented me from using// run-rustfix
in another PR (#110432 (comment)).Also some drive-by renames of functions that have been annoying me for a bit.