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

Avoid side-effects from try_coerce when suggesting borrowing LHS of cast #114834

Merged
merged 2 commits into from
Aug 20, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 15, 2023

The name try_coerce is a bit misleading -- it has side-effects, so when it's used in diagnostics code, it sometimes causes spurious obligations to be registered which cause other errors to occur that really make no sense in context.

Addendum: let's just rename try_coerce to coerce -- the try_ part doesn't really add much, imo.

@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2023

r? @jackh726

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

@rustbot 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 Aug 15, 2023
@lcnr
Copy link
Contributor

lcnr commented Aug 15, 2023

r=me after #114828 lands, idk how they interact

@lcnr lcnr assigned lcnr and unassigned jackh726 Aug 15, 2023
@bors
Copy link
Contributor

bors commented Aug 15, 2023

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

@lcnr lcnr 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 18, 2023
@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup (error path only)

@bors
Copy link
Contributor

bors commented Aug 19, 2023

📌 Commit 406b0e2 has been approved by lcnr

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 19, 2023

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

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 19, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 20, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#114834 (Avoid side-effects from `try_coerce` when suggesting borrowing LHS of cast)
 - rust-lang#114968 (Fix UB in `std::sys::os::getenv()`)
 - rust-lang#114976 (Ignore unexpected incr-comp session dirs)
 - rust-lang#114999 (Migrate GUI colors test to original CSS color format)
 - rust-lang#115000 (custom_mir: change Call() terminator syntax to something more readable)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 33771df into rust-lang:master Aug 20, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Development

Successfully merging this pull request may close these issues.

5 participants