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

Better way to inject core macros #2247

Closed
catamorphism opened this issue Apr 19, 2012 · 3 comments · Fixed by #11774
Closed

Better way to inject core macros #2247

catamorphism opened this issue Apr 19, 2012 · 3 comments · Fixed by #11774
Labels
A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority

Comments

@catamorphism
Copy link
Contributor

From a FIXME in src/librustcsyntax/ext/expand.rs (just before the core_macros() function):

"FIXME: this is a terrible kludge to inject some macros into the default
compilation environment. When the macro-definition system is substantially
more mature, these should move from here, into a compiled part of libcore
at very least."

The macros in question are #error, #warn, #info, and #debug. The issue is to do something less kludgy ;-)

@msullivan
Copy link
Contributor

Issue #3114 seems like the approach we want to fix this. Changing the milestone to 3 to match #3114.

@msullivan
Copy link
Contributor

Nothing new.

@catamorphism
Copy link
Contributor Author

Not 1.0, low

bors added a commit that referenced this issue Jan 25, 2014
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes #2247
cc #11763
@bors bors closed this as completed in 86a8b03 Jan 25, 2014
nathanielherman pushed a commit to nathanielherman/rust that referenced this issue Jan 30, 2014
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes rust-lang#2247
cc rust-lang#11763
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
Format tests with rustfmt (101-150 of 300)

Extracted from rust-lang#2097.

Like rust-lang/miri#2244, these are "easy" cases that do not involve moving around comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants