summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue-1120.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/source/issue-1120.rs')
-rw-r--r--src/tools/rustfmt/tests/source/issue-1120.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/issue-1120.rs b/src/tools/rustfmt/tests/source/issue-1120.rs
new file mode 100644
index 000000000..e85c9af99
--- /dev/null
+++ b/src/tools/rustfmt/tests/source/issue-1120.rs
@@ -0,0 +1,9 @@
+// rustfmt-reorder_imports: true
+
+// Ensure that a use at the start of an inline module is correctly formatted.
+mod foo {use bar;}
+
+// Ensure that an indented `use` gets the correct indentation.
+mod foo {
+ use bar;
+}