-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
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 |
☔ The latest upstream changes (presumably #127357) made this pull request unmergeable. Please resolve the merge conflicts. |
98b4a89
to
55d4225
Compare
55d4225
to
921de9d
Compare
err.span_suggestion( | ||
err.span_suggestion_verbose( |
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.
Did you forget this one?
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.
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.)
@bors r+ rollup |
…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
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.
Fix incorrect suggestion, make verbose and change message to make more sense when it isn't a span label.