-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: Lazy evaluate consts in path_to_const
#14727
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
@@ -118,9 +118,12 @@ pub(crate) fn infer_query(db: &dyn HirDatabase, def: DefWithBodyId) -> Arc<Infer | |||
/// This is appropriate to use only after type-check: it assumes | |||
/// that normalization will succeed, for example. | |||
pub(crate) fn normalize(db: &dyn HirDatabase, trait_env: Arc<TraitEnvironment>, ty: Ty) -> Ty { | |||
if !ty.data(Interner).flags.intersects(TypeFlags::HAS_PROJECTION) { |
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.
I would believe this to ruin performance, could you check that? Because if it does I don't think we want to merge this.
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.
I changed that, and per the CI time we are good again. But it is not an important part of the PR, we can remove that (at cost of not being able to find layout for struct Something { some_field: [Ty; SOME_CONST] }
, the original issue works without this)
a2e0a61
to
2719beb
Compare
@bors r+ |
☀️ Test successful - checks-actions |
path_to_const
path_to_const
This increased type mismatched on webrender by 9 |
Probably is the same problem of #14844 |
Can we revert this before tomorrow's release before until this is fixed? |
Type mismatch is an experimental diagnostic, and the problem is easily solvable (I just need to find some time to put on it) so I don't think we should revert this only for false positive in type mismatch. Does it have other negative effects? |
Hmmm. I didn't realize that this wasn't a "core" diagnostic. I can live with disabling this diagnostic till it gets fixed :) |
fix #14275