-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 struct or union to add generic that impls trait #138042
Conversation
Signed-off-by: xizheyin <[email protected]>
Failed to set assignee to
|
HIR ty lowering was modified cc @fmease |
By the way, how to add the test? I tried but there were some problems. For example, here is a source file(
when I run it with
But with
|
r? compiler |
If you run You should add the test as a new UI test under |
Signed-off-by: xizheyin <[email protected]>
@rustbot label -S-waiting-on-author +S-waiting-on-review |
Thank you very much. I added ui test. @nnethercote |
Looks good, thanks. A suggestion for next time: if you add the new test in the first commit, and then make the change in the second commit, the reviewer can see how the test output changes in the second commit. This makes it easier to review. @bors r+ |
You mean that submitting the UI test in the first commit and then failing it in the PR will tell you the output of the old code, right? Makes sense, thanks! |
Suggest struct or union to add generic that impls trait Fixes rust-lang#135759 cc `@tdittr`
Suggest struct or union to add generic that impls trait Fixes rust-lang#135759 cc ``@tdittr``
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#134797 (Ergonomic ref counting) - rust-lang#137549 (Clean up various LLVM FFI things in codegen_llvm) - rust-lang#137977 (Reduce `kw::Empty` usage, part 1) - rust-lang#138042 (Suggest struct or union to add generic that impls trait) - rust-lang#138141 (tests: fix some typos in comment) - rust-lang#138150 (Streamline HIR intravisit `visit_id` calls for items) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138042 - xizheyin:issue-135759, r=nnethercote Suggest struct or union to add generic that impls trait Fixes rust-lang#135759 cc ```@tdittr```
…struct, r=nnethercote Fix dyn -> param suggestion in struct ICEs Makes the logic from rust-lang#138042 a bit less ICEy and more clean. Also fixes an incorrect suggestion when the struct already has generics. I'll point out the major changes and observations in the code. Fixes rust-lang#138229 Fixes rust-lang#138211 r? nnethercote since you reviewed the original pr, or re-roll if you don't want to review this
…struct, r=nnethercote Fix dyn -> param suggestion in struct ICEs Makes the logic from rust-lang#138042 a bit less ICEy and more clean. Also fixes an incorrect suggestion when the struct already has generics. I'll point out the major changes and observations in the code. Fixes rust-lang#138229 Fixes rust-lang#138211 r? nnethercote since you reviewed the original pr, or re-roll if you don't want to review this
Fixes #135759
cc @tdittr