-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Move std::{reflect,repr,Poly} to a libdebug crate #14364
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
Conversation
# fn main() { | ||
# let mystery_object = (); | ||
// `{:?}` will conveniently print any type, | ||
// but it requires the `debug` crate is linked in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"requires that the..." or "requires the debug
crate to be linked in"
Updated with comments. |
extern crate arena; | ||
extern crate collections; | ||
extern crate debug; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to not need this (even better if it's not required to build rustc and its dependencies at all), especially if we want to fiddle around with reflection (I thought of some improvements that weren't worth pursuing when everything was in libstd).
It'd be cool if this took the opportunity to allow registering flags for fmt. Would open the way for |
What's the failure mode when somebody tries to use |
Resolve will complain about the undefined path |
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes rust-lang#12019 [breaking-change]
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
This commit moves reflection (as well as the {:?} format modifier) to a new
libdebug crate, all of which is marked experimental.
This is a breaking change because it now requires the debug crate to be
explicitly linked if the :? format qualifier is used. This means that any code
using this feature will have to add
extern crate debug;
to the top of thecrate. Any code relying on reflection will also need to do this.
Closes #12019
[breaking-change]