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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
This fails to compile
trait Matrix { const EYE: f64; } fn get_EYE<M: Matrix>(t: M) { M::EYE }
with error: Associated consts cannot depend on type parameters or Self. [E0329], but it should work.
error: Associated consts cannot depend on type parameters or Self. [E0329]
The text was updated successfully, but these errors were encountered:
rust-lang/rfcs#1062
Sorry, something went wrong.
Error is different now:
rustc 1.16.0-nightly (47c8d9fdc 2017-01-08) error[E0308]: mismatched types --> <anon>:8:5 | 8 | M::EYE | ^^^^^^ expected (), found f64 | = note: expected type `()` = note: found type `f64` error: aborting due to previous error
From this updated case:
#![feature(associated_consts)] trait Matrix { const EYE: f64; } fn get_EYE<M: Matrix>(t: M) { M::EYE } fn main() { }
Works as expected with a corrected test case.
For reference, fixed by #30446
No branches or pull requests
This fails to compile
with
error: Associated consts cannot depend on type parameters or Self. [E0329]
, but it should work.The text was updated successfully, but these errors were encountered: