Skip to content
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

Can't derive a fixed-size arrays. #13981

Closed
KokaKiwi opened this issue May 6, 2014 · 1 comment
Closed

Can't derive a fixed-size arrays. #13981

KokaKiwi opened this issue May 6, 2014 · 1 comment

Comments

@KokaKiwi
Copy link

KokaKiwi commented May 6, 2014

When compiling this:

#[deriving(Eq)]
struct Toto {
    data: [u8, ..20],
}

fn main() {
}

rustc output an error:

$ rustc main.rs
main.rs:4:5: 4:21 error: mismatched types: expected `&&[u8]` but found `&[u8, .. 20]` (expected &-ptr but found vector)
main.rs:4     data: [u8, ..20],
              ^~~~~~~~~~~~~~~~
note: in expansion of #[deriving]
main.rs:2:1: 3:7 note: expansion site
main.rs:4:5: 4:21 error: mismatched types: expected `&&[u8]` but found `&[u8, .. 20]` (expected &-ptr but found vector)
main.rs:4     data: [u8, ..20],
              ^~~~~~~~~~~~~~~~
note: in expansion of #[deriving]
main.rs:2:1: 3:7 note: expansion site
error: aborting due to 2 previous errors

It seems to me that there is no reason to not allow this, so I reported it.

My rustc version:

$ rustc --version
rustc 0.11-pre-nightly (abdacec 2014-05-04 23:16:40 -0700)
host: x86_64-unknown-linux-gnu
@sfackler
Copy link
Member

sfackler commented May 6, 2014

This should be covered by #7622.

@sfackler sfackler closed this as completed May 6, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 13, 2023
Don't run flycheck on startup unless checkOnSave is enabled

The main reason people disable it is because they don't want the expensive checks to occur automatically, so we shouldn't trigger them at the start up either if this is disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants