You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Overflow evaluating well-formedness requirement with empty trait bound on associated type #148349
rustc 1.91.0 as well as nightly (1.93.0-nightly (2025-10-30 d5419f1e97b90741d518)) produce an overflow error when using a where clause on an associated type when the bound in the where clause is empty. While this is a pathological example, this did occur in auto-generated code (e.g. in verus).
traitSomeBound{}traitTwhereSelf::Assoc:,// this works://Self::Assoc: SomeBound{typeAssoc;}
I expected this to compile successfully (and indeed it did on Rust 1.88).
On nightly and with 1.91 (rustc 1.91.0 (f8297e351 2025-10-28)), I get the following error:
Compiling playground v0.0.1 (/playground)
error[E0275]: overflow evaluating the requirement `<Self as T>::Assoc well-formed`
--> src/lib.rs:4:5
|
4 | Self::Assoc:,
| ^^^^^^^^^^^
|
note: required by a bound in `T`
--> src/lib.rs:4:5
|
3 | trait T where
| - required by a bound in this trait
4 | Self::Assoc:,
| ^^^^^^^^^^^ required by this bound in `T`
For more information about this error, try `rustc --explain E0275`.
error: could not compile `playground` (lib) due to 1 previous error
searched toolchains nightly-2025-05-09 through nightly-2025-08-02
********************************************************************************
Regression in nightly-2025-05-18
********************************************************************************
fetching https://static.rust-lang.org/dist/2025-05-17/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2025-05-17: 40 B / 40 B [=============================================] 100.00 % 73.10 KB/s converted 2025-05-17 to 16d2276fa6fccb0cc239a542d4c3f0eb46f660ec
fetching https://static.rust-lang.org/dist/2025-05-18/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2025-05-18: 40 B / 40 B [============================================] 100.00 % 114.82 KB/s converted 2025-05-18 to 777d372772aa3b39ba7273fcb8208a89f2ab0afd
looking for regression commit between 2025-05-17 and 2025-05-18
fetching (via remote github) commits from max(16d2276fa6fccb0cc239a542d4c3f0eb46f660ec, 2025-05-15) to 777d372772aa3b39ba7273fcb8208a89f2ab0afd
ending github query because we found starting sha: 16d2276fa6fccb0cc239a542d4c3f0eb46f660ec
get_commits_between returning commits, len: 8
commit[0] 2025-05-16: Auto merge of #140911 - rust-lang:cargo_update, r=clubby789
commit[1] 2025-05-16: Auto merge of #140978 - davidtwco:deep-reject-in-match-norm-trait-ref, r=lcnr
commit[2] 2025-05-17: Auto merge of #141002 - GuillaumeGomez:subtree-update_cg_gcc_2025-05-14, r=GuillaumeGomez
commit[3] 2025-05-17: Auto merge of #141024 - jieyouxu:revert-arm64ec, r=wesleywiser
commit[4] 2025-05-17: Auto merge of #141113 - matthiaskrgr:rollup-k7izuh8, r=matthiaskrgr
commit[5] 2025-05-17: Auto merge of #141116 - RalfJung:miri-sync, r=RalfJung
commit[6] 2025-05-17: Auto merge of #141133 - matthiaskrgr:rollup-u8ndxyz, r=matthiaskrgr
commit[7] 2025-05-17: Auto merge of #138087 - tgross35:core-float-math, r=Amanieu
ERROR: no CI builds available between 16d2276fa6fccb0cc239a542d4c3f0eb46f660ec and 777d372772aa3b39ba7273fcb8208a89f2ab0afd within last 167 days
This is an intended change, we did not expect much breakage from it however. cc @rust-lang/types
Is this challenging to work around on in verus? My current tendency is to close this as intended, we could stop the lowering as explicit WellFormed clauses in predicates_of but instead only check that these empty where-clauses are well-formed in item WF check to avoid this breakage here..
I'm very curious if there is a simple fix to verus.
Given that there is breakage here (while we did the FCP in #140208 under the presumption of no breakage), I feel a bit conflicted about just closing as intended. On one hand, this has been stable for a couple releases now. On the other hand, #140208 didn't have great motivation other than just not wanted to try to support it in the new solver.
I think if there is a quick and simple fix to verus and we can get that landed, let's just do that. A simple fix in the compiler, regardless, would also not be the worst idea - if it's local and well thought out. I'd probably be happy to get it landed orthogonally.
I guess, I'm not happy to just close this as intended breakage - I want some defined resolution to this.
I don't think the justification for making wf goals not be coinductive was "dont want to put effort into it in the new solver", it was more of a "we're not sure that this is theoretically sound" iirc. I would like to keep treating them as not coinductive which means either treating this as intended breakage or no longer lowering Ty:, bounds to wf(Ty).
Making Ty: not lower to wf(Ty) seems fairly reasonable to me but I don't know if we might for some reason want to ensure that Ty sticks around after hir ty lowering which would make it problematic to drop altogether
I don't know if we might for some reason want to ensure that Ty sticks around after hir ty lowering which would make it problematic to drop altogether
I think we do want to check that these types are well-formed. We don't have to add these requirements to predicates_of/ the param_env however, we could lower them separately and then explicitly prove them in when checking that item WF
Activity
theemathas commentedon Nov 1, 2025
Bisection result:
theemathas commentedon Nov 1, 2025
Probably #140208 (comment)
cc @compiler-errors @lcnr
lcnr commentedon Nov 3, 2025
This is an intended change, we did not expect much breakage from it however. cc @rust-lang/types
Is this challenging to work around on in verus? My current tendency is to close this as intended, we could stop the lowering as explicit
WellFormedclauses inpredicates_ofbut instead only check that these empty where-clauses are well-formed in item WF check to avoid this breakage here..jackh726 commentedon Nov 3, 2025
I'm very curious if there is a simple fix to
verus.Given that there is breakage here (while we did the FCP in #140208 under the presumption of no breakage), I feel a bit conflicted about just closing as intended. On one hand, this has been stable for a couple releases now. On the other hand, #140208 didn't have great motivation other than just not wanted to try to support it in the new solver.
I think if there is a quick and simple fix to
verusand we can get that landed, let's just do that. A simple fix in the compiler, regardless, would also not be the worst idea - if it's local and well thought out. I'd probably be happy to get it landed orthogonally.I guess, I'm not happy to just close this as intended breakage - I want some defined resolution to this.
dschoepe commentedon Nov 3, 2025
Yes, this was easy to fix in verus by omitting empty bounds in the part that generates such code, but I figured I'd report it anyway.
BoxyUwU commentedon Nov 3, 2025
I don't think the justification for making wf goals not be coinductive was "dont want to put effort into it in the new solver", it was more of a "we're not sure that this is theoretically sound" iirc. I would like to keep treating them as not coinductive which means either treating this as intended breakage or no longer lowering
Ty:,bounds towf(Ty).Making
Ty:not lower towf(Ty)seems fairly reasonable to me but I don't know if we might for some reason want to ensure thatTysticks around after hir ty lowering which would make it problematic to drop altogetherlcnr commentedon Nov 4, 2025
I think we do want to check that these types are well-formed. We don't have to add these requirements to
predicates_of/ theparam_envhowever, we could lower them separately and then explicitly prove them in when checking that item WF