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

Constant __getrandom_internal should have UPPER_SNAKE_CASE name, e.g. __GETRANDOM_INTERNALrust-analyzernon_upper_case_globals #368

Closed
ethever opened this issue Aug 31, 2023 · 3 comments · Fixed by #369

Comments

@ethever
Copy link

ethever commented Aug 31, 2023

Constant __getrandom_internal should have UPPER_SNAKE_CASE name, e.g. __GETRANDOM_INTERNALrust-analyzernon_upper_case_globals

with getrandom = { version = "0.2", features = ["custom"] }

@josephlr
Copy link
Member

josephlr commented Aug 31, 2023

Fair point, ideally we would just call it _, but that requires Rust 1.37. Changing the name of __getrandom_internal shouldn't break anything. It's name doesn't matter unlike __getrandom_custom.

@ethever
Copy link
Author

ethever commented Aug 31, 2023

Should we add something like #[allow(non_upper_case_globals)] to the macro's implmentation to disable the ide hinting?

@ethever
Copy link
Author

ethever commented Aug 31, 2023

Okkk... seems the #[allow(non_upper_case_globals)] only working after Rust 1.59

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 a pull request may close this issue.

2 participants