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

Refine error spans for const args in hir typeck #108961

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

compiler-errors
Copy link
Member

Improve just a couple of error messages having to do with mismatched consts.

r? @ghost i'll put this up when the dependent commits are merged

@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 Mar 9, 2023
@compiler-errors compiler-errors marked this pull request as ready for review March 15, 2023 19:05
@compiler-errors
Copy link
Member Author

r? compiler

@lcnr
Copy link
Contributor

lcnr commented Mar 16, 2023

r? @BoxyUwU

@rustbot rustbot assigned BoxyUwU and unassigned lcnr Mar 16, 2023
@@ -8,7 +8,7 @@ error: the constant `ASSUME_ALIGNMENT` is not of type `Assume`
--> $DIR/issue-101739-1.rs:8:14
|
LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Assume`, found `bool`
Copy link
Member

Choose a reason for hiding this comment

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

do we have the "machinery" in rustc to do the same thing as with exprs, for other paths so that this has a nicer span?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, this has to do with wfcheck which notoriously has bad spans, e.g. playground. I've looked into it, doesn't seem to have a good solution.

Copy link
Member

Choose a reason for hiding this comment

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

sad :(

@BoxyUwU
Copy link
Member

BoxyUwU commented Mar 21, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Mar 21, 2023

📌 Commit 2e7472f has been approved by BoxyUwU

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 Mar 21, 2023
@compiler-errors
Copy link
Member Author

@bors rollup

since this is on the error path only

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 23, 2023
…r=BoxyUwU

Refine error spans for const args in hir typeck

Improve just a couple of error messages having to do with mismatched consts.

r? `@ghost` i'll put this up when the dependent commits are merged
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 23, 2023
…r=BoxyUwU

Refine error spans for const args in hir typeck

Improve just a couple of error messages having to do with mismatched consts.

r? ``@ghost`` i'll put this up when the dependent commits are merged
@matthiaskrgr
Copy link
Member

@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 Mar 23, 2023
@compiler-errors
Copy link
Member Author

blessed

@bors r=BoxyUwU

@bors
Copy link
Contributor

bors commented Mar 23, 2023

📌 Commit 6c6bd01 has been approved by BoxyUwU

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 23, 2023
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 23, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#108629 (rustdoc: add support for type filters in arguments and generics)
 - rust-lang#108924 (panic_immediate_abort requires abort as a panic strategy)
 - rust-lang#108961 (Refine error spans for const args in hir typeck)
 - rust-lang#108986 (sync LVI tests)
 - rust-lang#109142 (Add block-based mutex unlocking example)
 - rust-lang#109368 (fix typo in the creation of OpenOption for RustyHermit)
 - rust-lang#109493 (Return nested obligations from canonical response var unification)
 - rust-lang#109515 (Add AixLinker to support linking on AIX)
 - rust-lang#109536 (resolve: Rename some cstore methods to match queries and add comments)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit eb82a5a into rust-lang:master Mar 24, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 24, 2023
@compiler-errors compiler-errors deleted the refine-ct-errors branch August 11, 2023 20:14
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.

6 participants