about summary refs log tree commit diff
path: root/src/tools/rustfmt/tests/mod-resolver/module-not-found
diff options
context:
space:
mode:
authorCaleb Cartwright <caleb.cartwright@outlook.com>2022-03-29 23:17:30 -0500
committerCaleb Cartwright <caleb.cartwright@outlook.com>2022-03-29 23:17:30 -0500
commit419df99e1824a5b65eb0c6d67850dfe014b019fa (patch)
treef48b577363bf95818a608eecbbcfef182abbbcd2 /src/tools/rustfmt/tests/mod-resolver/module-not-found
parent9c06e1ba47e1077725a950e0b5d1870a89c8b536 (diff)
parent5ff7b632a95bac6955611d85040859128902c580 (diff)
Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree
Diffstat (limited to 'src/tools/rustfmt/tests/mod-resolver/module-not-found')
-rw-r--r--src/tools/rustfmt/tests/mod-resolver/module-not-found/bad_path_attribute/lib.rs3
-rw-r--r--src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/a.rs2
-rw-r--r--src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/lib.rs1
-rw-r--r--src/tools/rustfmt/tests/mod-resolver/module-not-found/sibling_module/lib.rs2
4 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/mod-resolver/module-not-found/bad_path_attribute/lib.rs b/src/tools/rustfmt/tests/mod-resolver/module-not-found/bad_path_attribute/lib.rs
new file mode 100644
index 00000000000..2a63c961be8
--- /dev/null
+++ b/src/tools/rustfmt/tests/mod-resolver/module-not-found/bad_path_attribute/lib.rs
@@ -0,0 +1,3 @@
+// module resolution fails because the path does not exist.
+#[path = "path/to/does_not_exist.rs"]
+mod a;
diff --git a/src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/a.rs b/src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/a.rs
new file mode 100644
index 00000000000..4a1eac8965d
--- /dev/null
+++ b/src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/a.rs
@@ -0,0 +1,2 @@
+// module resolution fails because `./a/b.rs` does not exist
+mod b;
diff --git a/src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/lib.rs b/src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/lib.rs
new file mode 100644
index 00000000000..f21af614da0
--- /dev/null
+++ b/src/tools/rustfmt/tests/mod-resolver/module-not-found/relative_module/lib.rs
@@ -0,0 +1 @@
+mod a;
diff --git a/src/tools/rustfmt/tests/mod-resolver/module-not-found/sibling_module/lib.rs b/src/tools/rustfmt/tests/mod-resolver/module-not-found/sibling_module/lib.rs
new file mode 100644
index 00000000000..d9d9e1e3c90
--- /dev/null
+++ b/src/tools/rustfmt/tests/mod-resolver/module-not-found/sibling_module/lib.rs
@@ -0,0 +1,2 @@
+// module resolution fails because `./a.rs` does not exist
+mod a;