-
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
Replace calls to has_local_value with needs_infer. #70285
Comments
@rustbot claim I want to look into this, may take a few days though. |
This sounds right. I was wondering whether that flag still needed to exist really, given that the gcx/tcx split was removed. |
@nikomatsakis What would you prefer we do to "fresh variables"? Does anything rely on I guess there's at least one place where we want to check if any types or consts could be later replaced ("is further specializable" type checks), but @davidtwco is adding a special flag for that. I'll have to do an audit of all uses of |
I'd like to get rid of fresh variables altogether, but in the meantime, I don't think anything should be relying on that -- they really shouldn't leak outside of the select caching in the trait system, I don't think. |
Okay I've looked at all
|
Submitted #70658 to address the second case from eddy's comment. |
…-specializable, r=eddyb add `STILL_FURTHER_SPECIALIZABLE` flag Contributes to rust-lang#70285. This PR adds a `STILL_FURTHER_SPECIALIZABLE` flag to `TypeFlags` which replaces `needs_infer` and `needs_subst` in `Instance::resolve` and `assemble_candidates_from_impls`. r? @eddyb
…-specializable, r=eddyb add `STILL_FURTHER_SPECIALIZABLE` flag Contributes to rust-lang#70285. This PR adds a `STILL_FURTHER_SPECIALIZABLE` flag to `TypeFlags` which replaces `needs_infer` and `needs_subst` in `Instance::resolve` and `assemble_candidates_from_impls`. r? @eddyb
The only difference between the two is that "fresh" variables (a predecessor of the "canonical query" system) are considered
needs_infer
, despite not really taking part in inference.I think that even without changing/replacing the "freshening" system at all, we can make "fresh" variables not
needs_infer
, removing the need forTypeFlags::KEEP_IN_LOCAL_TCX
andhas_local_value
(which only existed for the'gcx
vs'tcx
split anyway).If we want to be more explicit, we could rename
needs_infer
tois_local_to_inference_context
or something similar, but either way I think it makes more sense than "local value".cc @nikomatsakis @matthewjasper @Zoxc
This issue has been assigned to @lcnr via this comment.
The text was updated successfully, but these errors were encountered: