Discarding evaluatable bounds and soundness #40
Labels
A-eval-bounds
Const evaluatability bounds
C-design-docs
Category: This is part of our design documentation
K-behavior
Document Kind: regarding user visible behavior
P-optional
Priority: not strictly required
S-active
What is this
This is a design document for const generics. Any discussions about its content should be on zulip. The conclusions of these discussions should then be edited back into this issue. Please do not post any comments directly in this issue.
Content
Assuming that we add const evaluatability bounds, there might be a lot of cases where explicit bounds are obviously correct but cannot be discarded automatically be the compiler.
To satisfy the bounds of
small
andbig
we would have to add both bounds touses_both
, even though the bound ofbig
also guarantees that the bound ofsmall
holds. This is impossible to verify for the compiler in the general case.It would therefore be nice to somehow discard the bound of
small
as the author ofuses_both
without being able to prove that it must hold.How to do that is still unclear however.
The text was updated successfully, but these errors were encountered: