Skip to content

Register new snapshots #12026

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

Merged
merged 1 commit into from
Feb 4, 2014
Merged

Register new snapshots #12026

merged 1 commit into from
Feb 4, 2014

Conversation

alexcrichton
Copy link
Member

No description provided.

@bors bors closed this Feb 4, 2014
@bors bors merged commit 6c41192 into rust-lang:master Feb 4, 2014
@alexcrichton alexcrichton deleted the snapshots branch February 5, 2014 00:09
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 11, 2024
New Lint: [`thread_local_initializer_can_be_made_const`]

Adds a new lint to suggest using `const` on `thread_local!` initializers that can be evaluated at compile time.

Impl details:

The lint relies on the expansion of `thread_local!`. For non const-labelled initializers, `thread_local!` produces a function called `__init` that lazily initializes the value. We check the function and decide whether the body can be const. If so, we lint that the initializer value can be made const.

changelog: new lint [`thread_local_initializer_can_be_made_const`]

fixes: rust-lang#12015
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

Successfully merging this pull request may close these issues.

3 participants