-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix tuple_array_conversions lint on nightly #11379
Conversation
r? @xFrednet (rustbot has picked a reviewer for you, use r? to override) |
Generic const exprs is not needed to reproduce that ICE. Here's a reproducer without any unstable features: fn repro<const N: usize>() {
let src = [0; N];
let dest: (u8,) = (src[0],);
}
Can you add this is a test case so that it doesn't regress? |
@y21 thanks for the suggestion! Test added. |
Looks good to me, thank you for the ICE fix! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
tl;dr: changed
Const::eval_target_usize
toConsts::try_eval_target_usize
to get rid of ICE.I have encountered a problem with clippy: it caught ICE when working with a codebase that uses a lot of nightly features.
Here's a (stripped) ICE info:
I don't really know what's going on low-level-wise, but seems like this lin assumed that the length of the array can always be treated as
usize
, and I assume this doesn't play well withfeat(generic_const_exprs)
.I wasn't able to build a minimal reproducible example, but locally this fix does resolve the issue.