-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Suggest collect
ing into Vec<_>
#105523
Suggest collect
ing into Vec<_>
#105523
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred in need_type_info.rs cc @lcnr |
This comment was marked as resolved.
This comment was marked as resolved.
8701ab9
to
7b109bd
Compare
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
Outdated
Show resolved
Hide resolved
Remove previously existing fallback that tried to give a good turbofish suggestion, `need_type_info` is already good enough. Special case `::<Vec<_>` suggestion for `Iterator::collect`.
c0dac34
to
165efab
Compare
r? @compiler-errors i'll give this another look-over after lunch |
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.
r=me with one nit addressed or not
compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
Outdated
Show resolved
Hide resolved
@bors r=compiler-errors |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#103644 (Add docs for question mark operator for Option) - rust-lang#105161 (Refine when invalid prefix case error arises) - rust-lang#105491 (Illegal sized bounds: only suggest mutability change if needed) - rust-lang#105502 (Suggest impl in the scenario of typo with fn) - rust-lang#105523 (Suggest `collect`ing into `Vec<_>`) - rust-lang#105595 (Suggest dereferencing receiver arguments properly) - rust-lang#105611 (fold instead of obliterating args) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
… r=compiler-errors Suggest defining const parameter when appropriate Helps a bit with rust-lang#91119. Following rust-lang#105523's lead, I use placeholder `/* Type */` instead of `_` in the suggestion. It should be easier for newcomers to parse. `@rustbot` label A-diagnostics r? diagnostics
Fix #105510.