Skip to content

Rename thread_local_initializer_can_be_made_const to missing_const_for_thread_local #12974

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

Conversation

alex-semenyuk
Copy link
Member

@alex-semenyuk alex-semenyuk commented Jun 21, 2024

Close #12934
As discussed at #12934 name thread_local_initializer_can_be_made_const sounds against convention for other lints which describe the issue/wrong code but not suggestion and it is quite long. The new name take example from existing lint missing_const_for_fn

changelog: thread_local_initializer_can_be_made_const : Rename to [missing_const_for_thread_local]

@rustbot
Copy link
Collaborator

rustbot commented Jun 21, 2024

r? @Alexendoo

rustbot has assigned @Alexendoo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 21, 2024
@alex-semenyuk alex-semenyuk marked this pull request as draft June 21, 2024 13:23
@alex-semenyuk alex-semenyuk force-pushed the rename_thread_local_initializer_can_be_made_const branch 2 times, most recently from e10ebef to 333c887 Compare June 21, 2024 13:56
@alex-semenyuk alex-semenyuk marked this pull request as ready for review June 21, 2024 13:58
@alex-semenyuk
Copy link
Member Author

^^ @Alexendoo

@Alexendoo
Copy link
Member

How about missing_const_for_thread_local? That it's a thread local is the important part of the name, I don't think we should abbreviate it

@alex-semenyuk alex-semenyuk marked this pull request as draft July 4, 2024 17:54
@alex-semenyuk alex-semenyuk force-pushed the rename_thread_local_initializer_can_be_made_const branch 3 times, most recently from 4a097af to 72a8a12 Compare July 4, 2024 18:34
@alex-semenyuk alex-semenyuk changed the title Rename thread_local_initializer_can_be_made_const to missing_const_for_tl_init Rename thread_local_initializer_can_be_made_const to missing_const_for_thread_local Jul 4, 2024
@alex-semenyuk alex-semenyuk marked this pull request as ready for review July 4, 2024 18:39
@bors
Copy link
Contributor

bors commented Jul 5, 2024

☔ The latest upstream changes (presumably #13037) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 5, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 5, 2024

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git pull --rebase https://github.com/rust-lang/rust-clippy.git master
$ git push --force-with-lease

The following commits are merge commits:

@alex-semenyuk alex-semenyuk marked this pull request as draft July 5, 2024 06:52
@alex-semenyuk alex-semenyuk force-pushed the rename_thread_local_initializer_can_be_made_const branch 2 times, most recently from 3c06e6e to b62576f Compare July 5, 2024 07:53
@alex-semenyuk alex-semenyuk marked this pull request as ready for review July 5, 2024 08:03
@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 5, 2024
@alex-semenyuk alex-semenyuk force-pushed the rename_thread_local_initializer_can_be_made_const branch 2 times, most recently from facf982 to fe04ab3 Compare July 5, 2024 08:31
@alex-semenyuk
Copy link
Member Author

@Alexendoo sounds good, renamed

@alex-semenyuk alex-semenyuk force-pushed the rename_thread_local_initializer_can_be_made_const branch from fe04ab3 to 44cf7cb Compare July 5, 2024 14:27
@alex-semenyuk alex-semenyuk force-pushed the rename_thread_local_initializer_can_be_made_const branch from 44cf7cb to 6621e6c Compare July 5, 2024 14:41
@Alexendoo
Copy link
Member

Great, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 5, 2024

📌 Commit 6621e6c has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 5, 2024

⌛ Testing commit 6621e6c with merge 8919357...

bors added a commit that referenced this pull request Jul 5, 2024
…can_be_made_const, r=Alexendoo

Rename thread_local_initializer_can_be_made_const to missing_const_for_thread_local

Close #12934
As discussed at #12934 name `thread_local_initializer_can_be_made_const` sounds against convention for other lints which describe the issue/wrong code but not suggestion and it is quite long. The new name take example from existing lint `missing_const_for_fn`

changelog [`thread_local_initializer_can_be_made_const`] : Rename to `missing_const_for_thread_local`
@bors
Copy link
Contributor

bors commented Jul 5, 2024

💔 Test failed - checks-action_test

@Alexendoo
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Jul 5, 2024

⌛ Testing commit 6621e6c with merge 3ed690f...

@bors
Copy link
Contributor

bors commented Jul 5, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 3ed690f to master...

@bors bors merged commit 3ed690f into rust-lang:master Jul 5, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename lint THREAD_LOCAL_INITIALIZER_CAN_BE_MADE_CONST
4 participants