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

Tweak "wrong # of generics" suggestions #127374

Merged
merged 4 commits into from
Jul 24, 2024

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Jul 5, 2024

Fix incorrect suggestion, make verbose and change message to make more sense when it isn't a span label.

@rustbot
Copy link
Collaborator

rustbot commented Jul 5, 2024

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 5, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Jul 8, 2024

idk about the verbose version. The short version seems clearer to me as all the information is in one location, and the remove span doesn't even overlap with the error span

@bors
Copy link
Contributor

bors commented Jul 9, 2024

☔ The latest upstream changes (presumably #127357) made this pull request unmergeable. Please resolve the merge conflicts.

err.span_suggestion(
err.span_suggestion_verbose(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget this one?

Copy link
Contributor Author

@estebank estebank Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those correspond to these, https://github.com/rust-lang/rust/pull/127374/files/921de9d8eae16947c375febe0ab8709797b37119#diff-1d620ac138e59caa4ee1265c976245aea8bb80648f969e59af382d38bfd84dd9R14, which I could not find an example where they would be rendered on their own, as when there are more than one suggestion they then get rendered as verbose, but given how long the suggested code and span are, I'd prefer to leave these as verbose. (I personally find "help: frobnicate the expression: very::long::code::<that, goes, const { on }>(and, on)" to be quite hard to read.)

@oli-obk
Copy link
Contributor

oli-obk commented Jul 24, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 24, 2024

📌 Commit 921de9d has been approved by oli-obk

It is now in the queue for this repository.

@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 Jul 24, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 24, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#126152 (size_of_val_raw: for length 0 this is safe to call)
 - rust-lang#127252 (Add edge-case examples to `{count,leading,trailing}_{ones,zeros}` methods)
 - rust-lang#127374 (Tweak "wrong # of generics" suggestions)
 - rust-lang#127457 (Make tidy fast without compromising case alternation)
 - rust-lang#127480 (Fix build failure on vxworks rust-lang#127084 )
 - rust-lang#127733 (Replace some `mem::forget`'s with `ManuallyDrop`)
 - rust-lang#128120 (Gate `AsyncFn*` under `async_closure` feature)
 - rust-lang#128131 (Import `c_void` rather than using the full path)
 - rust-lang#128133 (Improve spans on evaluated `cfg_attr`s.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 91c03ef into rust-lang:master Jul 24, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Jul 24, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 24, 2024
Rollup merge of rust-lang#127374 - estebank:wrong-generic-args, r=oli-obk

Tweak "wrong # of generics" suggestions

Fix incorrect suggestion, make verbose and change message to make more sense when it isn't a span label.
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants