-
Notifications
You must be signed in to change notification settings - Fork 1.6k
cast_lossless on const item #2267
New issue
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
Comments
I cannot reproduce on the playpen. Are you sure you're running the latest clippy? |
My mistake I meant: const FOO: i32 = 42;
const FOO_I64: i64 = FOO as i64; |
We should not be doing this suggestion inside constants until From/Into are usable in constants |
Just needs a regression test |
I just got this suggestion when I use I assume this is a regression? (I'm using latest
|
not a regression, just a bug ;) Const fn and constants have mostly the same rules, so we shouldn't suggest non-const stuff |
New issue for this is #3656 |
Triggers the suggestion
try: i64::from(FOO)
which isn't possible (yet?).The text was updated successfully, but these errors were encountered: