Description
Unfortunately, I can't reproduce this at a smaller scale. This issue occurs with https://github.com/sgrif/diesel as of commit 9084bb62d74f50e5686a85d6145cfe655ee2a3ba. Rust version is rustc 1.9.0-nightly (c9629d61c 2016-03-10)
Currently the tests (run from the diesel_tests
directory with cargo test --no-default-features --features "unstable postgres"
) pass. However, applying the following patch:
diff --git a/diesel_tests/tests/boxed_queries.rs b/diesel_tests/tests/boxed_queries.rs
new file mode 100644
index 0000000..5cb4cbb
--- /dev/null
+++ b/diesel_tests/tests/boxed_queries.rs
@@ -0,0 +1,2 @@
+use super::schema::*;
+use diesel::*;
diff --git a/diesel_tests/tests/lib.rs b/diesel_tests/tests/lib.rs
index aef11d1..901a091 100644
--- a/diesel_tests/tests/lib.rs
+++ b/diesel_tests/tests/lib.rs
@@ -11,6 +11,7 @@ include!("lib.in.rs");
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
mod associations;
+mod boxed_queries;
mod expressions;
mod connection;
mod filter;
causes the following compiler error:
tests/types_roundtrip.rs:87:9: 87:18 error: a module named `connection` has already been imported in this module [E0252]
tests/types_roundtrip.rs:87 use super::*;
^~~~~~~~~
tests/types_roundtrip.rs:87:9: 87:18 help: run `rustc --explain E0252` to see a detailed explanation
tests/types_roundtrip.rs:87:9: 87:18 note: previous import of `connection` here
tests/types_roundtrip.rs:87 use super::*;
which is claiming that an import conflicts with itself. I have pushed up the branch compiler-error-demo
with that change applied for easy reproduction. Again, I'm sorry that I cannot provide a report on a smaller scale, but this appears to be some edge case blowing up. I have no clue why adding a module with a few imports and nothing else would be causing this issue.