summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0761.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0761.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0761.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0761.md b/compiler/rustc_error_codes/src/error_codes/E0761.md
new file mode 100644
index 000000000..760c58976
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0761.md
@@ -0,0 +1,21 @@
+Multiple candidate files were found for an out-of-line module.
+
+Erroneous code example:
+
+```ignore (Multiple source files are required for compile_fail.)
+// file: ambiguous_module/mod.rs
+
+fn foo() {}
+
+// file: ambiguous_module.rs
+
+fn foo() {}
+
+// file: lib.rs
+
+mod ambiguous_module; // error: file for module `ambiguous_module`
+ // found at both ambiguous_module.rs and
+ // ambiguous_module.rs/mod.rs
+```
+
+Please remove this ambiguity by deleting/renaming one of the candidate files.