Uh oh!
There was an error while loading. Please reload this page.
Change a commit_if_ok call to probe - #105292
Conversation
This comment has been minimized.
This comment has been minimized.
e91e731 to
9cc1988Comparerustbot
commented
Dec 5, 2022
Some changes occurred in const_evaluatable.rs cc @lcnr |
9cc1988 to
1058dcdComparebors
commented
Dec 6, 2022
☔ The latest upstream changes (presumably #105365) made this pull request unmergeable. Please resolve the merge conflicts. |
BoxyUwU
commented
Dec 6, 2022
replacing this with a What's needed is to have the visitor visit all the consts regardless of it succeeds in unifying with something, and if it succeed in unifying with something (in the probe) track that in |
aaf7eb5 to
0bec1bbCompareJulianKnodt
commented
Dec 13, 2022
I updated to check for only a single match and commit the change if there is a single one, but somehow this results in an error for the original test case. Is this an issue with the way I implemented it? |
This comment has been minimized.
This comment has been minimized.
BoxyUwU
commented
Dec 15, 2022
the current code only works for a single |
0bec1bb to
878d3eaCompareUh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
BoxyUwU
commented
Dec 20, 2022
I think all the CI failures are caused by cases where we have duplicate candidates, i.e. two |
BoxyUwU
commented
Dec 21, 2022
Can you add the following as tests: #![feature(generic_const_exprs)]#![allow(incomplete_features)]fnfoo<constN:usize>()where[();N + 1]:,[();N + 1]:,{bar::<N>();}fnbar<constN:usize>()where[();N + 1]:,{}fnmain(){}#![feature(generic_const_exprs)]#![allow(incomplete_features)]constfnboth(_:usize,b:usize) -> usize{
b
}fnfoo<constN:usize>()where[();both(N + 1,N + 1)]:,{bar::<N>();}fnbar<constN:usize>()where[();N + 1]:,{}fnmain(){}#![feature(generic_const_exprs)]#![allow(incomplete_features)]constfnboth(_:usize,b:usize) -> usize{
b
}fnfoo<constN:usize,constM:usize>() -> [();N + 2]where[();both(N + 1,M + 1)]:,{bar()}fnbar<constN:usize>() -> [();N]where[();N + 1]:,{[();N]}fnmain(){} |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
51d614e to
f1e1e81CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f1e1e81 to
31d5febCompareBoxyUwU
commented
Jan 9, 2023
will r+ this once its rebased |
Instead of just switching to a probe, check for different matches, and see how many there are. If one, unify it, otherwise return true and let it be unified later.
This prevents an ICE due to a value not actually being evaluatable later.
31d5feb to
21c5ffeCompareBoxyUwU
commented
Jan 9, 2023
@bors r+ rollup |
bors
commented
Jan 9, 2023
…yUwU Change a commit_if_ok call to probe Removes an over-eager `commit_if_ok` which makes inference worse. I'm not entirely sure whether it's ok to remove the check that types are the same, because casting seems to cause equality checks with incorrect types? Fixesrust-lang#105037 r? `@BoxyUwU`
…yUwU Change a commit_if_ok call to probe Removes an over-eager `commit_if_ok` which makes inference worse. I'm not entirely sure whether it's ok to remove the check that types are the same, because casting seems to cause equality checks with incorrect types? Fixesrust-lang#105037 r? ``@BoxyUwU``
…fee1-dead Rollup of 10 pull requests Successful merges: - rust-lang#105292 (Change a commit_if_ok call to probe) - rust-lang#105655 (Remove invalid case for mutable borrow suggestion) - rust-lang#106047 (Fix ui constant tests for big-endian platforms) - rust-lang#106061 (Enable Shadow Call Stack for Fuchsia on AArch64) - rust-lang#106164 (Move `check_region_obligations_and_report_errors` to `TypeErrCtxt`) - rust-lang#106291 (Fix incorrect suggestion for extra `&` in pattern) - rust-lang#106389 (Simplify some canonical type alias names) - rust-lang#106468 (Use FxIndexSet when updating obligation causes in `adjust_fulfillment_errors_for_expr_obligation`) - rust-lang#106549 (Use fmt named parameters in rustc_borrowck) - rust-lang#106614 (error-code docs improvements (No. 2)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…compiler-errors Added const-generic ui test case for issue rust-lang#106419 This PR adds a test case for rust-lang#106419 which has been fixed in master by rust-lang#105292 I also ran the test on f769d34 (the commit before rust-lang#105292 was merged) and it did fail there with the following output. ``` --- stderr ------------------------------- error[E0308]: mismatched types --> /home/patrikk/src/rust/src/test/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs:5:10 | LL | #[derive(Clone)] | ^^^^^ | | | expected `A`, found `B` | expected `Bar<A, B>` because of return type | = note: expected struct `Bar<A, _>` found struct `Bar<B, _>` = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error For more information about this error, try `rustc --explain E0308`. ------------------------------------------ ```
Removes an over-eager
commit_if_okwhich makes inference worse.I'm not entirely sure whether it's ok to remove the check that types are the same, because casting seems to cause equality checks with incorrect types?
Fixes#105037
r? @BoxyUwU