Skip to content

Conversation

SkiFire13
Copy link
Contributor

In #83759 while rebasing I didn't realize there was a new function for suggesting to add lifetime arguments. It relied on some invariants, namely that if a generic type/trait has angle brackets then it must have some generic argument, which is now no longer true. This PR updates that function to handle the new invariants.

This also adds a new regression test but I'm not sure if that's the correct place for it.

Fixes #85347

@rust-highfive
Copy link
Contributor

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 16, 2021
@jackh726
Copy link
Member

Maybe a better place for the regression test would be under src/test/ui/suggestions?

@jackh726
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 20, 2021

📌 Commit 363eacd has been approved by jackh726

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 20, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request May 20, 2021
…laumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#85275 (Move `std::memchr` to `sys_common`)
 - rust-lang#85326 (bootstrap: ensure host std when cross-compiling tools, fixes rust-lang#85320)
 - rust-lang#85375 (Fix missing lifetimes diagnostics after rust-lang#83759)
 - rust-lang#85507 (Extend escape key check)
 - rust-lang#85509 (Prevent tab title to "null" if the URL is a search one)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 67d5435 into rust-lang:master May 20, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 20, 2021
@SkiFire13 SkiFire13 deleted the fix-85347 branch May 20, 2021 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: assertion failed: !self.gen_args.args.is_empty()', compiler/rustc_typeck/src/structured_errors/wrong_number_of_generic_args.rs:514:17
5 participants