dedupe and simplify type alias formatting by calebcartwright · Pull Request #506...
source link: https://github.com/rust-lang/rustfmt/pull/5068
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.
Conversation
From my perspective we've got a good chunk of unnecessarily duplicative code handling type alias formatting, and even more generally, visitation of associated items. This not only increases the blast radius when there's relevant upstream changes in rustc, but also created a more difficult mental model for tracking how ty aliases get formatted.
Have been meaning to get around to trying to clean this up, and finally had some bandwidth this morning. This is the first part of a refactor that essentially encapsulates the handling of the TyAliasKind
nodes in one place, and allows for a side-by-side view on how the generic bounds and right hand side of aliases are formatted depending on the respective context in which the aliases appear.
Recommend
-
8
Copy link Contributor inquisitivecrystal
-
4
vSAN Storage Rules policy capability allows to set dedupe per VM? Duncan Epping · Aug 24, 2021 ·
-
8
New issue Simplify and speed up search for local path based deps with cargo fmt --all #4997
-
6
Conversation Backport of stabilization from 2.x for the upcoming 1.4.38 release, refs
-
5
Copy link Member calebcartwright
-
5
New issue dedupe associated item visitation #5069
-
4
Conversation We currently utilize generics, primarily bound on our Rewrite trait, when formatting a RHS (e.g. on an assignment) which makes perfect sense given the high number of expres...
-
6
New issue extractor, utils: dedupe bitcode paths before linking #54
-
5
Copy link Member Author calebc...
-
5
Conversation Just a handful of swaps from the by-value cursor to by-ref cursor so as to avoid some un...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK