We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug const_assert!() doesn't seem to be able to constexpr-evaluate function parametrics.
const_assert!()
To Reproduce
pub struct A {} impl A { fn B<C:u32>() -> bool { const_assert!(C >= u32:4); true } }
Expected behavior It should typecheck and the assertion should pass or fail base on invocation.
Instead, I get TypeInferenceError: const_assert! expression is not constexpr regardless of the invocations of A::B<...>().
TypeInferenceError: const_assert! expression is not constexpr
A::B<...>()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
const_assert!()
doesn't seem to be able to constexpr-evaluate function parametrics.To Reproduce
Expected behavior
It should typecheck and the assertion should pass or fail base on invocation.
Instead, I get
TypeInferenceError: const_assert! expression is not constexpr
regardless of the invocations ofA::B<...>()
.The text was updated successfully, but these errors were encountered: