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 wrong span for trait selection failure error reporting #113945

Merged
merged 2 commits into from Aug 4, 2023

Conversation

chenyukang
Copy link
Member

Fixes #113447

@rustbot
Copy link
Collaborator

rustbot commented Jul 22, 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 Jul 22, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Aug 3, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 3, 2023

📌 Commit 864368a has been approved by cjgillot

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 Aug 3, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 3, 2023
…-2, r=cjgillot

Fix wrong span for trait selection failure error reporting

Fixes rust-lang#113447
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 3, 2023
…-2, r=cjgillot

Fix wrong span for trait selection failure error reporting

Fixes rust-lang#113447
@matthiaskrgr
Copy link
Member

@bors r-
more tests are failing

@bors 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 Aug 3, 2023
@chenyukang
Copy link
Member Author

oops, sorry.
I just rebased to master and fixed it.

@cjgillot
Copy link
Contributor

cjgillot commented Aug 3, 2023

Could you explain what this second commit does?

@chenyukang
Copy link
Member Author

This line of code is added in PR: https://github.com/rust-lang/rust/pull/114322/files

let ObligationCauseCode::FunctionArgumentObligation { .. } = obligation.cause.code() else {

which disabled suggest_convert_to_slice for the scenario of binary operation, this suggestion missed:

help: convert the array to a `&[u8]` slice instead
   |
LL |     let _ = &[0u8] == &[0xAA][..];
   |  

my commit is enable to it.

@cjgillot
Copy link
Contributor

cjgillot commented Aug 4, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Aug 4, 2023

📌 Commit cde8f06 has been approved by cjgillot

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 4, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 4, 2023
…-2, r=cjgillot

Fix wrong span for trait selection failure error reporting

Fixes rust-lang#113447
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 4, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#113945 (Fix wrong span for trait selection failure error reporting)
 - rust-lang#114351 ([rustc_span][perf] Remove unnecessary string joins and allocs.)
 - rust-lang#114418 (bump parking_lot to 0.12)
 - rust-lang#114434 (Improve spans for indexing expressions)
 - rust-lang#114450 (Fix ICE failed to get layout for ReferencesError)
 - rust-lang#114461 (Fix unwrap on None)
 - rust-lang#114462 (interpret: add mplace_to_ref helper method)
 - rust-lang#114472 (Reword `confusable_idents` lint)
 - rust-lang#114477 (Account for `Rc` and `Arc` when suggesting to clone)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5054e41 into rust-lang:master Aug 4, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 4, 2023
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 11, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#113945 (Fix wrong span for trait selection failure error reporting)
 - rust-lang#114351 ([rustc_span][perf] Remove unnecessary string joins and allocs.)
 - rust-lang#114418 (bump parking_lot to 0.12)
 - rust-lang#114434 (Improve spans for indexing expressions)
 - rust-lang#114450 (Fix ICE failed to get layout for ReferencesError)
 - rust-lang#114461 (Fix unwrap on None)
 - rust-lang#114462 (interpret: add mplace_to_ref helper method)
 - rust-lang#114472 (Reword `confusable_idents` lint)
 - rust-lang#114477 (Account for `Rc` and `Arc` when suggesting to clone)

r? `@ghost`
`@rustbot` modify labels: rollup
calebcartwright pushed a commit to calebcartwright/rust that referenced this pull request Oct 23, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#113945 (Fix wrong span for trait selection failure error reporting)
 - rust-lang#114351 ([rustc_span][perf] Remove unnecessary string joins and allocs.)
 - rust-lang#114418 (bump parking_lot to 0.12)
 - rust-lang#114434 (Improve spans for indexing expressions)
 - rust-lang#114450 (Fix ICE failed to get layout for ReferencesError)
 - rust-lang#114461 (Fix unwrap on None)
 - rust-lang#114462 (interpret: add mplace_to_ref helper method)
 - rust-lang#114472 (Reword `confusable_idents` lint)
 - rust-lang#114477 (Account for `Rc` and `Arc` when suggesting to clone)

r? `@ghost`
`@rustbot` modify labels: rollup
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.

Nonsensical help message in error E0277
6 participants