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

Remove the log statement #5293

Closed
wants to merge 3 commits into from
Closed

Remove the log statement #5293

wants to merge 3 commits into from

Conversation

brson
Copy link
Contributor

@brson brson commented Mar 9, 2013

r? @graydon

This removes log from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to __log and hides it behind macros.

After this the only way to log is with debug!, info!, etc. I figure that if there is demand for log! we can add it back later.

I am not sure that we ever agreed on this course of action, though I think there is consensus that log shouldn't be a statement.

@bstrie
Copy link
Contributor

bstrie commented Mar 9, 2013

+1. Now that you can do error!(foo) there absolutely no reason to prefer log(error, foo), and this also frees up people to use the error, debug, etc identifiers in their own code.

@brson
Copy link
Contributor Author

brson commented Mar 9, 2013

This would close #3941 and fixes part of #3627

@graydon
Copy link
Contributor

graydon commented Mar 11, 2013

I'm ok removing the expression; it seems like the long term fix (not just renaming) requires thinking about either globals or fast tls.

We can't quite remove logging from the language, but this hides the
keyword.
bors added a commit that referenced this pull request Mar 13, 2013
r? @graydon

This removes `log` from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to `__log` and hides it behind macros.

After this the only way to log is with `debug!`, `info!`, etc. I figure that if there is demand for `log!` we can add it back later.

I am not sure that we ever agreed on this course of action, though I *think* there is consensus that `log` shouldn't be a statement.
@bors bors closed this Mar 13, 2013
bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2020
…ansch

don't emit lifetime lint warnings for code inside macros.

Fixes rust-lang#5283

changelog: Don't emit lifetime lint warnings for code inside macros.
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.

4 participants