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

Small macro cleanups #20776

Merged
merged 2 commits into from
Jan 10, 2015
Merged

Small macro cleanups #20776

merged 2 commits into from
Jan 10, 2015

Conversation

kmcallister
Copy link
Contributor

r? @alexcrichton. This passes tests for me.

panic!(concat!("assertion failed: ", stringify!($cond)))
}
);
($cond:expr, $($arg:tt)+) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this use of :tt wasn't actually propagated down to libcore, could you do that as well?

@alexcrichton
Copy link
Member

Nice thinking! I forgot we could rely on panic! being redefine in libstd.

Could you basically do a pass where you copy-paste the current definitions into libcore? They've been tweaked slightly and just want to make sure all the changes stay in place.

Thanks!

Keegan McAllister added 2 commits January 9, 2015 11:06
The libstd definitions move to libcore, which causes some minor updates there.
@kmcallister
Copy link
Contributor Author

Pushed the libcore updates, along with a rebase.

Nice thinking! I forgot we could rely on panic! being redefine in libstd.

Yeah, this basically exploits a lack of hygiene on macros referring to other macros. Which I don't think we'll fix any time soon...

bors added a commit that referenced this pull request Jan 9, 2015
@bors bors merged commit a96a8b2 into rust-lang:master Jan 10, 2015
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.

3 participants