Open AuroransSolis opened 3 years ago
so the issue seems to be caused by the caller not having feature(generic_const_exprs)
enabled.
while the error is a bit surprising, it doesn't really seem worth it to spend a lot of effort on fixing this issue.
edit: updated for
generic_const_exprs
Issue two of three I'm going to be filing tonight with very similar code regarding
const_generics
andconst_evaluatable_checked
.This is the code that causes the bug:
The issue occurs when called from another crate like so:
Now you're probably thinking to yourself, "Hey Auro, isn't that exactly the same code as in #82956?" Nope, not quite. The
foo
assignment is just0
, not0u8
. When called in the above manner, the following error message is produced:When called internally (like in a test module), the test runs without issue (see here for a few tests that all run perfectly fine under
cargo test
).Meta
rustc --version --verbose
: