-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
WIP: stability annotations on generic parameters #65083
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
r? @petrochenkov cc @varkor (for the |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Sorry, I haven't had time to look into this yet. The error regarding |
r? @varkor |
Ping from triage. Thank you! |
@JohnCSimon I believe the only known remaining issue is I have not had time to look into it this last week. I just committed and pushed the change I made last week, to resolve the unmarked API issue. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@varkor
hashbrown = { version = "0.6.2", default-features = false, features = ['rustc-dep-of-std'] } self.lookup_stability: Some(Stability { level: Unstable { reason: Some("this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?"), issue: 27812, is_soft: false }, feature: "rustc_private", rustc_depr: None, const_stability: None, promotable: false, allow_const_fn_ptr: false })
path.res: Def(Struct, DefId(1:30275 ~ core[9364]::hash[0]::sip[0]::SipHasher13[0])) |
@Avi-D-coder: hashbrown is a dep of libstd, as it provides the implementation of |
Ping from triage. Thank you! |
@JohnCSimon work is on going at the testing branch of my fork. As you can see |
Ping from triage: |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Okay so the next step is blocking type inference and figuring out why stability does not work for Structs. @varkor any advice? |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@Avi-D-coder: sorry, I've been busy lately. I'll try to take a look soon and get back to you. |
☔ The latest upstream changes (presumably #68725) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage: |
@JohnCSimon no progress. |
@Avi-D-coder closing this due to inactivity. Thanks for contributing |
@varkor Where you able to look into this again? |
@Avi-D-coder: I'm sorry for leaving this floundering. I haven't yet looked into the struct stability issue, but I could give some pointers for how to approach the type inference blocking. If I remember correctly, we essentially want to force unstabilised defaults to be used when their feature flag is not enabled. The method for deciding what generic arguments to use (e.g. given by a user, inferred or defaulted) is rust/src/librustc_typeck/astconv.rs Lines 794 to 795 in f8b796b
As we're just trying to get things working at this point, we don't have to work out the nicest way to handle this straight away. I would suggest adding an extra condition at the top of each closure (I think create_substs_for_generic_args is called in 3 places, but the one in confirm.rs is probably not relevant) that checks whether the generic parameter (param ) is unstable (and the feature flag is not enabled), and if it is, just returns the default (there's already code for this in the has_default branches).
Perhaps it would be possible to write a few bullet points summarising what is working so far, and what remains to be done? This would be helpful both for refreshing my memory, and also for rust-lang/wg-allocators#2. |
ping from triage: |
This will be a fix to wg-allocators #2.
I'm currently trying to figure out why
src/test/ui/stability-attribute/stability-attribute-generic.rs
does not produce the desired error.