summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/configs/chain_width/small.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/source/configs/chain_width/small.rs')
-rw-r--r--src/tools/rustfmt/tests/source/configs/chain_width/small.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/configs/chain_width/small.rs b/src/tools/rustfmt/tests/source/configs/chain_width/small.rs
new file mode 100644
index 000000000..26f935453
--- /dev/null
+++ b/src/tools/rustfmt/tests/source/configs/chain_width/small.rs
@@ -0,0 +1,23 @@
+// rustfmt-chain_width: 40
+
+struct Fluent {}
+
+impl Fluent {
+ fn blorp(&self) -> &Self {
+ self
+ }
+}
+
+fn main() {
+ let test = Fluent {};
+
+ // should not be wrapped
+ test.blorp();
+ test.blorp().blorp();
+ test.blorp().blorp().blorp();
+ test.blorp().blorp().blorp().blorp();
+
+ // should be wrapped
+ test.blorp().blorp().blorp().blorp().blorp();
+ test.blorp().blorp().blorp().blorp().blorp().blorp();
+}