-
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
Fix FIXME for generic_arg_infer
in create_substs_for_ast_path
#91847
Conversation
❤️ |
📌 Commit 6c79595 has been approved by |
…lcnr Fix FIXME for `generic_arg_infer` in `create_substs_for_ast_path` Fixes a FIXME, does some general refactoring of this fn, and also fixes a bug where we would use a const params defaults instead of an inference var ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=19456f65ea5dc3fcaa9b696f842ab380)) (lot of stuff in one PR but it was all so close together...) r? `@lcnr` Fixes rust-lang#91614
LL | let y = Mask::<_, _>::splat(false); | ||
| - ^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` | ||
| | | ||
| consider giving `y` the explicit type `Mask<_, LANES>`, where the type parameter `T` is specified |
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.
| consider giving `y` the explicit type `Mask<_, LANES>`, where the type parameter `T` is specified | |
| consider giving `y` the explicit type `Mask<T, LANES>`, where the type parameter `T` is specified |
Shouldn't the _
be T
for the suggestion to make sense (in isolation)? It says consider giving […] the explicit type […], where the type parameter T
is specified. In this case , it might not be ambiguous. However, when more type parameters are involved it would be. I remember there was some part in rustc which could handle this generically.
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.
Yea this error message is sort of weird (especially how it is _
for the type and LANES
for the const despite both being inference var)
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#91699 (Add `-webkit-appearance: none` to search input) - rust-lang#91846 (rustdoc: Reduce number of arguments for `run_test` a bit) - rust-lang#91847 (Fix FIXME for `generic_arg_infer` in `create_substs_for_ast_path`) - rust-lang#91849 (GATs outlives lint: Try to prove bounds) - rust-lang#91855 (Stabilize const_cstr_unchecked) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes a FIXME, does some general refactoring of this fn, and also fixes a bug where we would use a const params defaults instead of an inference var (playground)
(lot of stuff in one PR but it was all so close together...)
r? @lcnr
Fixes #91614