-
Notifications
You must be signed in to change notification settings - Fork 1.9k
do not use associated types placeholder for inlay hint #6387
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
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
|
Hm. That actually is the opposite from what I expected -- we want to use valid syntax when printing to source code, i.e. not use the placeholder syntax; on the other hand, the |
|
Oops I'm sorry I misunderstood. I will update to fit with your needs ASAP |
|
No worries, I missed that inlay hints don't actually use |
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
| 383..388 'inner': Map<|&f64| -> f64> | ||
| 401..404 'vec': Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> | ||
| 407..416 'from_iter': fn from_iter<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>, Repeat<Map<|&f64| -> f64>>>(Repeat<Map<|&f64| -> f64>>) -> Vec<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>> | ||
| 407..416 'from_iter': fn from_iter<IntoIterator::Item<Repeat<Map<|&f64| -> f64>>>, Repeat<Map<|&f64| -> f64>>>(Repeat<Map<|&f64| -> f64>>) -> Vec<<Repeat<Map<|&f64| -> f64>> as IntoIterator>::Item> |
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.
this change is surprising. are we still calling display somewhere in check_infer?
crates/hir_ty/src/tests/traits.rs
Outdated
| let y: <RefMutL<T> as ApplyL>::Out = no_matter; | ||
| y; | ||
| } //^ ApplyL::Out<T> | ||
| } //^ <T as ApplyL>::Out |
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.
same question here
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
flodiebold
left a comment
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.
Thanks!
bors r+
| ret.display_truncated(f.db, f.max_size) | ||
| } else { | ||
| ret.display(f.db) | ||
| if f.display_target.is_test() { |
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.
hmm, these seem like they were already bugs. We should be reusing the whole HirFormatter. Anyway, we can look into that separately.
6396: refactor(hir_ty): do not override DisplayTarget in hir_fmt r=flodiebold a=bnjjj Linked to bug discovery from #6387 The main goal is to not use `display()` method inside `hir_fmt` to not override any parameters (like `DisplayTarget`). cc @flodiebold Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
close #6191