5

Tweak borrow suggestion span by compiler-errors · Pull Request #110504 · rust-la...

 1 year ago
source link: https://github.com/rust-lang/rust/pull/110504
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Member

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.

Collaborator

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

rustbot

added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Apr 18, 2023

This comment has been minimized.

Contributor

Could you completely remove the span_to_snippet call by making the suggestion multipart?

Member

Author

I could, but that would require a bit more work, since this function currently has a very strange API:

-> Option<(
        Span,
        String,
        String,
        Applicability,
        bool, /* verbose */
        bool, /* suggest `&` or `&mut` type annotation */
    )> {

I guess I'll look into it.

Contributor

@bors r+

Contributor

pushpin Commit cf24419 has been approved by cjgillot

It is now in the queue for this repository.

Contributor

evergreen_tree The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Apr 28, 2023

bors

added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Apr 29, 2023

Member

Author

rebased

@bors r=cjgillot

Contributor

pushpin Commit f0e7af4 has been approved by cjgillot

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

labels

May 1, 2023

Contributor

umbrella The latest upstream changes (presumably #110579) made this pull request unmergeable. Please resolve the merge conflicts.

bors

removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label

May 3, 2023

bors

added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label

May 3, 2023

Member

Author

rebased again

@bors r=cjgillot

Contributor

pushpin Commit 4731a25 has been approved by cjgillot

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

labels

May 8, 2023

bors

merged commit 2ecc722 into

rust-lang:master

May 9, 2023

11 checks passed

rustbot

added this to the 1.71.0 milestone

May 9, 2023

rust-timer

added a commit to rust-lang-ci/rust that referenced this pull request

May 9, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

cjgillot

Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects

None yet

Milestone

1.71.0

Development

Successfully merging this pull request may close these issues.

None yet

6 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK