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