-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Compiler crash with #[thread_local] #47215
Comments
Both are solved by mir borrowck/nll. rust/src/librustc/middle/mem_categorization.rs Lines 681 to 687 in b98fd52
|
…-from-moving-out-of-thread-local-under-ast-borrowck, r=nikomatsakis Do not allow moving out of thread local under ast borrowck AST borrowck failed to prevent moving out of a thread-local static. This was broken. And it also (sometimes?) caused an ICE during drop elaboration. Fix rust-lang#47215 Fix rust-lang#54797
In addition to being fixed by NLL, this is also fixed by #55150. (The NLL-fixed-by-NLL is intended for issues that are only fixed when NLL is enabled...) |
(assigning medium priority; the PR is approved that fixes this, #55150, is approved, and this ICE is only exposed by a feature that is currently nightly-only.) |
…-from-moving-out-of-thread-local-under-ast-borrowck, r=nikomatsakis Do not allow moving out of thread local under ast borrowck AST borrowck failed to prevent moving out of a thread-local static. This was broken. And it also (sometimes?) caused an ICE during drop elaboration. Fix rust-lang#47215 Fix rust-lang#54797
produces the following error:
Also, the following code fails to compile due to a lifetime error, but doesn't crash the compiler:
Output:
The text was updated successfully, but these errors were encountered: