summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/configs/chain_width/tiny.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/configs/chain_width/tiny.rs')
-rw-r--r--src/tools/rustfmt/tests/target/configs/chain_width/tiny.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/configs/chain_width/tiny.rs b/src/tools/rustfmt/tests/target/configs/chain_width/tiny.rs
new file mode 100644
index 000000000..960d245f8
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/configs/chain_width/tiny.rs
@@ -0,0 +1,26 @@
+// 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();
+}