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

Cannot make an array of an enum variant if a different variant may contain a non-copy type #17055

Closed
Gankra opened this issue Sep 6, 2014 · 2 comments

Comments

@Gankra
Copy link
Contributor

Gankra commented Sep 6, 2014

Canonical example [None, ..10] doesn't work for a generic [Option<T>, ..10]. It's possible to write a macro to accomplish this, but it sucks that that's necessary.

@japaric
Copy link
Member

japaric commented Oct 13, 2014

I think this is a duplicate of #5244

@alexcrichton
Copy link
Member

Aha, it is indeed, thanks @japaric!

lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
…iable, r=Veykril

fix: Replace Just the variable name in Unused Variable Diagnostic Fix

Changes Unused Variable diagnostic to just look at the variable name, not the entire syntax range.

Also added a test for an unused variable in an array destructure.

Closes rust-lang#17053
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
…iable, r=Veykril

fix: Replace Just the variable name in Unused Variable Diagnostic Fix

Changes Unused Variable diagnostic to just look at the variable name, not the entire syntax range.

Also added a test for an unused variable in an array destructure.

Closes rust-lang#17053
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

3 participants