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

Improve const mismatch FulfillmentError #100437

Merged
merged 4 commits into from
Aug 29, 2022

Conversation

compiler-errors
Copy link
Member

Fixes #100414

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 12, 2022
@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 12, 2022
.emit();
);
let code = error.obligation.cause.code().peel_derives().peel_match_impls();
if let ObligationCauseCode::BindingObligation(..) | ObligationCauseCode::ItemObligation(..) = code {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird, but I found that other ObligationCauseCodes provided strange messages. I can create a diff if the reviewer is curious to see what I mean, but BindingObligation and ItemObligation are general enough that their message is always pretty useful.

@oli-obk
Copy link
Contributor

oli-obk commented Aug 22, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Aug 22, 2022

📌 Commit a5725a9 has been approved by oli-obk

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 22, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 23, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
@matthiaskrgr
Copy link
Member

@bors r-
failed in #100902 (comment)
😕 maybe needs a reblessing?

@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 23, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Aug 25, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Aug 25, 2022

📌 Commit 8189a45 has been approved by oli-obk

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 25, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 26, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 26, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 26, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 26, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 27, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 28, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 28, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 28, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 28, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 28, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 28, 2022
…tch-err, r=oli-obk

Improve const mismatch `FulfillmentError`

Fixes rust-lang#100414
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 29, 2022
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#94890 (Support parsing IP addresses from a byte string)
 - rust-lang#96334 (socket `set_mark` addition.)
 - rust-lang#99027 (Replace `Body::basic_blocks()` with field access)
 - rust-lang#100437 (Improve const mismatch `FulfillmentError`)
 - rust-lang#100843 (Migrate part of rustc_infer to session diagnostic)
 - rust-lang#100897 (extra sanity check against consts pointing to mutable memory)
 - rust-lang#100959 (translations: rename warn_ to warning)
 - rust-lang#101111 (Use the declaration's SourceInfo for FnEntry retags, not the outermost)
 - rust-lang#101116 ([rustdoc] Remove Attrs type alias)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 26c86c6 into rust-lang:master Aug 29, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 29, 2022
@compiler-errors compiler-errors deleted the better-const-mismatch-err branch August 11, 2023 19:55
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.

Confusing error message when feature generic_const_exprs is used.
6 participants