Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #950.
cast(x as type)broke beforeaswith no indent, so the type sat at the column of the enclosing expression, and)stuck to it. #946 listed this as not covered:What changed
CAST now uses the function-call layout from #946: on one line when it fits; otherwise
(, thenexpr as typeone level in, and)back on the cast's line.expr as typeis a group of its own, so it stays together on the indented line when it fits there, and breaks beforeasonly when it doesn't:castStyle: operator(x::type) is unchanged.Snapshot changes
51 snapshot files change, all reviewed. The categories:
cast(x\nas type)becomescast(\n x as type\n)whenx as typefits on the indented line, orcast(\n x\n as type\n)when it doesn't. This is most of the diff, mostly long literals:jsonb,json,interval,tstypes,horology,xml,sqljson_queryfuncs,int8,md5,name,timestamptz,xid,txid.cast(format(/cast(row(used to hug the call, withas type)on the last line at the enclosing indent. Now the call sits one level insidecast(, followed byas typeand)on their own lines (brin,brin_bloom,brin_multi,amutils,type_sanity,stats_import,fast_default,jsonb).replace(...)chain incomplex_select_0/complex_select_part_2shows this, and it is the most visible change.extract(,tuplesort,window,arraysandplpgsqlmove the same way.New
cast_breaks_like_a_function_calltest inwidth_layout.rs. Allpgls_pretty_printtests and the option matrix (fixtures and regression suite) pass, and clippy is clean.