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