-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
const_evaluatable_checked: extend predicate collection #77049
Conversation
--> $DIR/from-sig-fail.rs:4:35 | ||
| | ||
LL | fn test<const N: usize>() -> [u8; N - 1] { | ||
| ^^^^^ attempt to compute `0_usize - 1_usize` which would overflow |
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.
Can we somehow tell the user that this is speciically about test<0>
?
I mean ideally we could report this on the call site
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.
Yeah, we should. Will do so in another PR though.
src/test/ui/const-generics/const_evaluatable_checked/let-bindings.stderr
Outdated
Show resolved
Hide resolved
Added a commit which assigns the correct We probably need a perf run for that, but we should be able to optimize it without issue. |
88c5983
to
7f8d8ae
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 7f8d8ae26ed96b7e283f215b870bd0a8323354cb with merge 8b29e63e47b49b0147a2ca5973bf66f00e90c2b2... |
☀️ Try build successful - checks-actions, checks-azure |
Queued 8b29e63e47b49b0147a2ca5973bf66f00e90c2b2 with parent f6d5920, future comparison URL. |
Finished benchmarking try commit (8b29e63e47b49b0147a2ca5973bf66f00e90c2b2): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
@bors rollup- |
r=me with a test demonstrating the type alias situation |
@bors r+ |
📌 Commit 7f8d8ae26ed96b7e283f215b870bd0a8323354cb has been approved by |
☔ The latest upstream changes (presumably #77102) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
7f8d8ae
to
21edd10
Compare
rebased and updated test output @bors r=oli-obk |
📌 Commit 21edd10 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
We now walk the hir instead of using
ty
so that we get better spans here, While I am still not completely sure if that'swhat we want in the end, it does seem a lot closer to the final goal than the previous version.
We also look into type aliases (and use a
TypeVisitor
here), about which I am not completely sure, but we will see how well this works.We also look into fn decls, so the following should work now.
Additionally, we visit the optional trait and self type of impls.
r? @oli-obk