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

Rename core::info, etc. and modernize #3941

Closed
brson opened this issue Nov 8, 2012 · 2 comments
Closed

Rename core::info, etc. and modernize #3941

brson opened this issue Nov 8, 2012 · 2 comments
Labels
A-syntaxext Area: Syntax extensions E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone

Comments

@brson
Copy link
Contributor

brson commented Nov 8, 2012

Constants named info, etc. are imported by default, and they can't be shadowed by variable bindings. At the minimum they should have less intrusive names, and follow the appropriate naming convention for constants.

They probably deserve to be enums, and therefore lang items.

These are rarely used, most people favoring the macros, so I think they should not even be imported by default, moved to core::logging.

@brson
Copy link
Contributor Author

brson commented Nov 8, 2012

Logging enums won't need to be lang items once log is a macro.

@brson
Copy link
Contributor Author

brson commented Feb 5, 2013

I think we should just get rid of these and log. Everybody uses the macros.

@sanxiyn sanxiyn closed this as completed Mar 26, 2013
RalfJung pushed a commit to RalfJung/rust that referenced this issue Oct 27, 2024
Replace set_last_error with set_last_error_and_return

Took care of the simple patterns. Other patterns involved setting an error and then using `write_int` or setting metadata and returning -1. Unsure if those are in the scope of this change

Looks like this has conflicts with rust-lang#3779, so I can update when how to handle that is decided.

Part of rust-lang/miri#3930.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants