Closed
Description
Hello,
I apologize up front if I am raising this issue incorrectly. The compiler says it would appreciate a bug report. Below is what it printed out:
hread 'main' panicked at 'cannot access a scoped thread local variable without calling `set` first', /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:186:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.29.2 (17a9dc751 2018-10-05) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `state2_test`.
To learn more, run the command again with --verbose.
It happened, for the first time, when declaring a reference in a function:
let ref tok_prediction:HashSet<u16>;
and then assigning it in each branch of an if condition:
if is_data {
tok_prediction = &self.data_predictions;
} else {
tok_prediction = &self.next_cwa.1;
}
if tok_prediction.contains(&cwa) {
};
It does not always fail on a cargo build, but generally will fail after a cargo clean
, cargo build
.
It generally always fails on a cargo build --release
.
Let me know if this issue report is acceptable,
Daniel Gibson