-
Notifications
You must be signed in to change notification settings - Fork 13.3k
#[deriving(...)] doesn't work for fixed-size vectors #6883
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
This problem is because fixed sized lists don't have fn foo<C:Clone>(x: C) {} let x: [int, .. 2] = [1,2]; foo(x)
(Fixed-sized vectors are strange.) |
OK. Naively, I think that it'd be nice if this could somehow Just Work™, but perhaps making that possible would break other things. At the least, the error message could be a lot more helpful. |
Yes, I agree that fixed size lists should implement the appropriate traits. (The problem is one can't parameterise the size, so to implement traits/methods for them at the moment, you have to go |
still relevant |
Linking to #7622 (this is almost certainly caused by that, but there is the possibility of some subtlety specific to #[deriving]). |
Closing in favour of #7622, since I don't think there are any issues unique to deriving for this. |
docs: update RA setup documentation Add documentation how to get rust-analyzer to like clippys `extern crate` rustc deps. Fixes rust-lang#6883 This initially removed `cargo-dev ra_setup` but it is still needed by folks who use intellij rust, so keeping that. changelog: none
Or something along those lines? I'm not quite sure what the correct terminology would be. When I try to compile this:
I get:
It seems like this should work straightforwardly. The same kind of issue pops up for Cmp, Eq, etc.
The text was updated successfully, but these errors were encountered: