File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,8 +286,7 @@ impl<'src> ParserState<'src> {
286286 F : FnOnce ( & mut ParserState < ' src > ) ,
287287 {
288288 self . shift_comments ( ) ;
289- let mut be = BreakableCallChainEntry :: new ( & self . formatting_context , is_user_multilined) ;
290- be. push_line_number ( self . current_orig_line_number ) ;
289+ let be = BreakableCallChainEntry :: new ( & self . formatting_context , is_user_multilined) ;
291290 self . breakable_entry_stack . push ( Breakable :: CallChain ( be) ) ;
292291
293292 f ( self ) ;
Original file line number Diff line number Diff line change @@ -367,11 +367,6 @@ impl<'src> BreakableCallChainEntry<'src> {
367367 insert_at ( idx, & mut self . tokens , tokens)
368368 }
369369
370- pub fn push_line_number ( & mut self , _number : LineNumber ) {
371- // No-op, BreakableCallChainEntry has custom multilining logic
372- // that doesn't depend on the source line numbers
373- }
374-
375370 /// Removes `BeginCallChainIndent` and `EndCallChainIndent`, which is only really
376371 /// necessary when rendering a call chain as single-line. This prevents unnecessariliy
377372 /// increasing the indentation for a trailing block in e.g. `thing.each do; /* block */; end`
@@ -434,9 +429,9 @@ impl<'src> Breakable<'src> {
434429 pub fn push_line_number ( & mut self , number : LineNumber ) {
435430 match self {
436431 Breakable :: DelimiterExpr ( be) => be. push_line_number ( number) ,
437- Breakable :: CallChain ( bcce ) => bcce . push_line_number ( number ) ,
438- Breakable :: InlineConditional ( _ ) => {
439- // No-op for conditional layout - line numbers are tracked by nested breakables
432+ Breakable :: CallChain ( _ ) | Breakable :: InlineConditional ( _ ) => {
433+ // ` InlineConditional` line numbers are tracked by nested breakables,
434+ // and `CallChain` has its own multilining logic
440435 }
441436 }
442437 }
You can’t perform that action at this time.
0 commit comments