-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Mark Any::get_type_id as experimental #19223
Conversation
It is likely going to be removed and replaced with an associated static. Fixes rust-lang#19222
79945fa
to
4705475
Compare
cc @aturon |
I don't think that associated statics are on the roadmap for 1.0, so this may have to be stable at 1.0 due to a lack of other method of implementing it. |
That was my initial thought, but we don't necessarily need to expose the type_id aspect here in the stable channel for 1.0; we could still stabilize the checked downcasting based on it. @reem how would you feel about |
Is there a reason something can't be |
@cmr Experimental/unstable items can be used internally in As far as the broader policy point, it's all laid out in the blog post on stability. |
@aturon as long as Ideally we'd get associated statics, but if that's impossible I can just redo this out of tree (that's what I did when AnyPrivate was private). |
Just bothered to look at TypeId's docs and it is clearly marked experimental. If both this and TypeId are unavailable on the stable version of Rust, then neither Hyper nor Iron are going to build on 1.0. That would be pretty unfortunate, but I'd honestly take the hit over |
@reem As we discussed above, marking this as (BTW, we are planning to run an initial 1.0 beta cycle where the stability lints are turned on, but where you can still use unstable features on the stable channel; that will help us discover things like |
@aturon That sounds great. I figured that TypeId would remain experimental just because it seems like such a raw tool that it wouldn't be finished yet, but certain parts of it could easily be marked stable. For instance, it would be easy to maintain backwards compatibility of |
@reem But you do rely on it implementing |
@aturon Yes, |
@reem Ah, I see: there's an inherent Great, this sounds quite doable. I will make sure |
@reem BTW, I just posted a comment with some more details about the stabilization status and plans. |
It is likely going to be removed and replaced with an associated static.
It is likely going to be removed and replaced
with an associated static.