Improve structured tuple struct suggestion by camelid · Pull Request #88631 · ru...
source link: https://github.com/rust-lang/rust/pull/88631
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Previously, the span was just for the constructor name, which meant it
would result in syntactically-invalid code when applied. Now, the span
is for the entire expression.
I also changed it to use span_suggestion_verbose
, for two reasons:
-
Now that the suggestion span has been corrected, the output is a bit
cluttered and hard to read. Putting the suggestion its own window
creates more space. -
It's easier to see what's being suggested, since now the version
after the suggestion is applied is shown.
r? @davidtwco
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK