-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
a103b5e
to
a482363
Compare
r? compiler |
r? @BoxyUwU |
a482363
to
66a5a6f
Compare
compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs
Outdated
Show resolved
Hide resolved
compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs
Outdated
Show resolved
Hide resolved
@@ -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` |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sad :(
66a5a6f
to
2e7472f
Compare
@bors r+ |
@bors rollup since this is on the error path only |
…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
…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
@bors r- |
2e7472f
to
6c6bd01
Compare
blessed @bors r=BoxyUwU |
…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
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