Skip to content
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

Add hint for collect type #5584

Merged
merged 1 commit into from
May 11, 2020
Merged

Conversation

Mark-Simulacrum
Copy link
Member

This should hopefully fix rust-lang/rust#72054 (comment) I have not yet had a chance to run tests locally though (I believe this should fix the remaining problem though).

I guess in the future we'll fix this upstream but this beta cycle we can't do that unfortunately :/

changelog: none

@Mark-Simulacrum
Copy link
Member Author

I think CI failure is because it's testing against master rustc?

r? @flip1995

@flip1995
Copy link
Member

Yes, we didn't set up our CI for the beta branch (yet). I'll take a look at it in about an hour and merge it by hand.

@flip1995
Copy link
Member

I think the second error:

error[E0277]: `std::vec::Vec<rustc_middle::ty::Predicate<'_>>` is not an iterator
   --> src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs:114:58
    |
114 |         let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.to_vec())
    |                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::vec::Vec<rustc_middle::ty::Predicate<'_>>` is not an iterator
    |
    = help: the trait `std::iter::Iterator` is not implemented for `std::vec::Vec<rustc_middle::ty::Predicate<'_>>

should also be addressed here. I currently am compiling the rust PR to test this PR.

@Mark-Simulacrum
Copy link
Member Author

I think I managed to address that upstream -- the PR on rust-lang/rust master changed that function to take impl Iterator but I changed it back to impl IntoIterator, there's not really a reason to force callers to .into_iter() on their side.

@flip1995 flip1995 merged commit d4092ac into rust-lang:beta May 11, 2020
@flip1995
Copy link
Member

Sorry for taking so long, had to compile LLVM... Local tests looked good.

I directly merged it in the beta branch, instead of branching it beforehand, since it will land in rustc beta branch anyway.

@Mark-Simulacrum please use commit d4092ac for the submodule update.

@Mark-Simulacrum Mark-Simulacrum deleted the beta-next branch May 11, 2020 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants