File tree 6 files changed +154
-0
lines changed
source/configs/chain_width
target/configs/chain_width
6 files changed +154
-0
lines changed Original file line number Diff line number Diff line change
1
+ // rustfmt-chain_width: 1
2
+ // setting an unachievable chain_width to always get chains
3
+ // on separate lines
4
+
5
+ struct Fluent { }
6
+
7
+ impl Fluent {
8
+ fn blorp ( & self ) -> & Self {
9
+ self
10
+ }
11
+ }
12
+
13
+ fn main ( ) {
14
+ let test = Fluent { } ;
15
+
16
+ // should be left alone
17
+ test. blorp ( ) ;
18
+
19
+ // should be wrapped
20
+ test. blorp ( ) . blorp ( ) ;
21
+ test. blorp ( ) . blorp ( ) . blorp ( ) ;
22
+ test. blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) ;
23
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-chain_width: 40
2
+
3
+ struct Fluent { }
4
+
5
+ impl Fluent {
6
+ fn blorp ( & self ) -> & Self {
7
+ self
8
+ }
9
+ }
10
+
11
+ fn main ( ) {
12
+ let test = Fluent { } ;
13
+
14
+ // should not be wrapped
15
+ test. blorp ( ) ;
16
+ test. blorp ( ) . blorp ( ) ;
17
+ test. blorp ( ) . blorp ( ) . blorp ( ) ;
18
+ test. blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) ;
19
+
20
+ // should be wrapped
21
+ test. blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) ;
22
+ test. blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) ;
23
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-chain_width: 20
2
+
3
+ struct Fluent { }
4
+
5
+ impl Fluent {
6
+ fn blorp ( & self ) -> & Self {
7
+ self
8
+ }
9
+ }
10
+
11
+ fn main ( ) {
12
+ let test = Fluent { } ;
13
+
14
+ // should not be wrapped
15
+ test. blorp ( ) ;
16
+ test. blorp ( ) . blorp ( ) ;
17
+
18
+ // should be wrapped
19
+ test. blorp ( ) . blorp ( ) . blorp ( ) ;
20
+ test. blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) ;
21
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-chain_width: 1
2
+ // setting an unachievable chain_width to always get chains
3
+ // on separate lines
4
+
5
+ struct Fluent { }
6
+
7
+ impl Fluent {
8
+ fn blorp ( & self ) -> & Self {
9
+ self
10
+ }
11
+ }
12
+
13
+ fn main ( ) {
14
+ let test = Fluent { } ;
15
+
16
+ // should be left alone
17
+ test. blorp ( ) ;
18
+
19
+ // should be wrapped
20
+ test. blorp ( )
21
+ . blorp ( ) ;
22
+ test. blorp ( )
23
+ . blorp ( )
24
+ . blorp ( ) ;
25
+ test. blorp ( )
26
+ . blorp ( )
27
+ . blorp ( )
28
+ . blorp ( ) ;
29
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-chain_width: 40
2
+
3
+ struct Fluent { }
4
+
5
+ impl Fluent {
6
+ fn blorp ( & self ) -> & Self {
7
+ self
8
+ }
9
+ }
10
+
11
+ fn main ( ) {
12
+ let test = Fluent { } ;
13
+
14
+ // should not be wrapped
15
+ test. blorp ( ) ;
16
+ test. blorp ( ) . blorp ( ) ;
17
+ test. blorp ( ) . blorp ( ) . blorp ( ) ;
18
+ test. blorp ( ) . blorp ( ) . blorp ( ) . blorp ( ) ;
19
+
20
+ // should be wrapped
21
+ test. blorp ( )
22
+ . blorp ( )
23
+ . blorp ( )
24
+ . blorp ( )
25
+ . blorp ( ) ;
26
+ test. blorp ( )
27
+ . blorp ( )
28
+ . blorp ( )
29
+ . blorp ( )
30
+ . blorp ( )
31
+ . blorp ( ) ;
32
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-chain_width: 20
2
+
3
+ struct Fluent { }
4
+
5
+ impl Fluent {
6
+ fn blorp ( & self ) -> & Self {
7
+ self
8
+ }
9
+ }
10
+
11
+ fn main ( ) {
12
+ let test = Fluent { } ;
13
+
14
+ // should not be wrapped
15
+ test. blorp ( ) ;
16
+ test. blorp ( ) . blorp ( ) ;
17
+
18
+ // should be wrapped
19
+ test. blorp ( )
20
+ . blorp ( )
21
+ . blorp ( ) ;
22
+ test. blorp ( )
23
+ . blorp ( )
24
+ . blorp ( )
25
+ . blorp ( ) ;
26
+ }
You can’t perform that action at this time.
0 commit comments