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

ICE in CFG builder with unused closure and upvars. #16256

Closed
luqmana opened this issue Aug 4, 2014 · 1 comment · Fixed by #18099
Closed

ICE in CFG builder with unused closure and upvars. #16256

luqmana opened this issue Aug 4, 2014 · 1 comment · Fixed by #18099
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@luqmana
Copy link
Member

luqmana commented Aug 4, 2014

Trying to compile this results in an ICE:

fn main() {
    let mut buf = Vec::new();
    |c: u8| buf.push(c);
}
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'assertion failed: self.nodeid_to_index.contains_key(&id)', /Users/Luqman/rust/src/librustc/middle/dataflow.rs:226

Using the closure by either assigning it to a variable or just calling it makes the ICE go away. It also only seems to happen when you capture something.

cc: @pnkfelix

@ghost
Copy link

ghost commented Sep 16, 2014

Seems fixed but it may need a test.

@ghost ghost added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 4, 2014
bors added a commit that referenced this issue Oct 18, 2014
Closes #9249.
Closes #13105.
Closes #13837.
Closes #13847.
Closes #15207.
Closes #15261.
Closes #16048. 
Closes #16098.
Closes #16256.
Closes #16562.
Closes #16596.
Closes #16709.
Closes #16747.
Closes #17025.
Closes #17121.
Closes #17450.
Closes #17636.
bors added a commit to rust-lang-ci/rust that referenced this issue Jan 8, 2024
…=Veykril

internal: Only compare relevant parts in  `ide::{runnables,inlay_hints}` tests

This PR limits the data being compared. Therefore the tests should be more readable, as well as being more robust to changes to the data structure.

Part of rust-lang/rust-analyzer#14268.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant