diff options
Diffstat (limited to 'src/tools/rustfmt/tests/target/configs/chain_width/always.rs')
-rw-r--r-- | src/tools/rustfmt/tests/target/configs/chain_width/always.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/configs/chain_width/always.rs b/src/tools/rustfmt/tests/target/configs/chain_width/always.rs new file mode 100644 index 000000000..b16d25251 --- /dev/null +++ b/src/tools/rustfmt/tests/target/configs/chain_width/always.rs @@ -0,0 +1,29 @@ +// rustfmt-chain_width: 1 +// setting an unachievable chain_width to always get chains +// on separate lines + +struct Fluent {} + +impl Fluent { + fn blorp(&self) -> &Self { + self + } +} + +fn main() { + let test = Fluent {}; + + // should be left alone + test.blorp(); + + // should be wrapped + test.blorp() + .blorp(); + test.blorp() + .blorp() + .blorp(); + test.blorp() + .blorp() + .blorp() + .blorp(); +} |