Skip to content

Initialize a static vector with vec!() leads to rustc failure. #13312

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
hirschenberger opened this issue Apr 4, 2014 · 1 comment
Closed
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@hirschenberger
Copy link
Contributor

rustc 0.11-pre (7056f97 2014-04-03 22:06:50 -0700)
host: x86_64-unknown-linux-gnu

Code:

static A: Vec<uint> = vec!(1);

Error:

<std macros>:4:13: 4:47 error: internal compiler error: no type for local variable 31u32
<std macros>:4         let mut _temp = ::std::vec::Vec::new();
@huonw huonw added the I-ICE label Apr 4, 2014
@alexcrichton
Copy link
Member

Fixed by #14183

notriddle pushed a commit to notriddle/rust that referenced this issue Nov 10, 2022
…kril

feat: add config for inserting must_use in `generate_enum_as_method`

Should fix rust-lang#13312

Didn't add a test because I was not sure on how to add test for a specific configuration option, tried to look for the usages for other `AssistConfig` variants but couldn't find any in `tests`. If there is a way to test this, do point me towards it.

I tried to extract the formatting string as a common `template_string` and only have if-else for that, but it didn't compile :(

Also it seems these tests are failing:

```
test config::tests::generate_config_documentation ... FAILED
test config::tests::generate_package_json_config ... FAILED
```

Can you also point me to how to correct these 😅  ( I guess there is some command to automatically generate these? )
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants