Skip to content
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

Fix suggestion for coercing Option<&String> to Option<&str> #107633

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

clubby789
Copy link
Contributor

Fixes #107604

This also makes the diagnostic MachineApplicable, and runs rustfix to check we're not producing incorrect code.

@rustbot label +A-diagnostics

@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2023

r? @davidtwco

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

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 Feb 3, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2023

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@rustbot rustbot added the A-diagnostics Area: Messages for errors, warnings, and lints label Feb 3, 2023
@Noratrieb
Copy link
Member

Can you add a test for the issue you're fixing?

@clubby789
Copy link
Contributor Author

I misread the issue and it turned out I wasn't fixing this 😅 Fixed and test added now

@Noratrieb
Copy link
Member

r? Nilstrieb

@rustbot rustbot assigned Noratrieb and unassigned davidtwco Feb 3, 2023
@Noratrieb
Copy link
Member

r=me when CI is green
@bors delegate+

@bors
Copy link
Contributor

bors commented Feb 3, 2023

✌️ @clubby789 can now approve this pull request

@clubby789
Copy link
Contributor Author

@bors r=Nilstrieb

@bors
Copy link
Contributor

bors commented Feb 3, 2023

📌 Commit f874f67 has been approved by Nilstrieb

It is now in the queue for this repository.

@bors 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 Feb 3, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Feb 3, 2023
…, r=Nilstrieb

Fix suggestion for coercing Option<&String> to Option<&str>

Fixes rust-lang#107604

This also makes the diagnostic `MachineApplicable`, and runs `rustfix` to check we're not producing incorrect code.

`@rustbot` label +A-diagnostics
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 3, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#107082 (Autotrait bounds on dyn-safe trait methods)
 - rust-lang#107427 (Add candidates for DiscriminantKind builtin)
 - rust-lang#107539 (Emit warnings on unused parens in index expressions)
 - rust-lang#107544 (Improve `TokenCursor`.)
 - rust-lang#107585 (Don't cause a cycle when formatting query description that references a FnDef)
 - rust-lang#107633 (Fix suggestion for coercing Option<&String> to Option<&str>)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c927027 into rust-lang:master Feb 3, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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
Development

Successfully merging this pull request may close these issues.

Compiler's help suggestion is incorrect when passing Option<String> into a function expecting Option<&str>
5 participants