Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Errors #451

Closed
reem opened this issue Aug 27, 2014 · 6 comments
Closed

Duplicate Errors #451

reem opened this issue Aug 27, 2014 · 6 comments

Comments

@reem
Copy link

reem commented Aug 27, 2014

Often when I build projects with many dependencies using cargo, I end up with stuff like:

       Fresh phantom v0.0.0 (https://github.com/reem/rust-phantom.git#deb5acfe)
       Fresh encoding v0.1.0 (https://github.com/lifthrasiir/rust-encoding#7e7950dd)
       Fresh error v0.0.0 (https://github.com/reem/rust-error.git#95c6524e)
       Fresh openssl v0.0.0 (https://github.com/sfackler/rust-openssl.git#07f12370)
       Fresh url v0.1.0 (https://github.com/servo/rust-url#23fb9ec2)
       Fresh typemap v0.0.0 (https://github.com/reem/rust-typemap.git#29b2a4c5)
       Fresh http v0.1.0-pre (https://github.com/chris-morgan/rust-http.git#b7f2fe74)
       Fresh plugin v0.0.0 (https://github.com/reem/rust-plugin.git#3f2a70b1)
       Fresh content-type v0.1.0 (https://github.com/reem/rust-http-content-type.git#3a1eb53f)
       Fresh iron v0.0.1 (https://github.com/iron/iron.git#d41fff63)
   Compiling persistent v0.1.0 (file:///Users/Jonathan/hackreactor/iron-middleware/persistent)
src/lib.rs:75:9: 75:59 error: expected typemap::Assoc<alloc::arc::Arc<sync::lock::Mutex<D>>>, but found typemap::Assoc<alloc::arc::Arc<D>> (expected struct sync::lock::Mutex but found type parameter) [E0095]
src/lib.rs:75         req.extensions.find::<Read<P, D>, Arc<Mutex<D>>>()
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:75:9: 75:59 error: expected typemap::Assoc<alloc::arc::Arc<sync::lock::Mutex<D>>>, but found typemap::Assoc<alloc::arc::Arc<D>> (expected struct sync::lock::Mutex but found type parameter) [E0095]
src/lib.rs:75         req.extensions.find::<Read<P, D>, Arc<Mutex<D>>>()
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:75:9: 75:59 error: expected typemap::Assoc<alloc::arc::Arc<sync::lock::Mutex<D>>>, but found typemap::Assoc<alloc::arc::Arc<D>> (expected struct sync::lock::Mutex but found type parameter) [E0095]
src/lib.rs:75         req.extensions.find::<Read<P, D>, Arc<Mutex<D>>>()
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib.rs:75:9: 75:59 error: expected typemap::Assoc<alloc::arc::Arc<sync::lock::Mutex<D>>>, but found typemap::Assoc<alloc::arc::Arc<D>> (expected struct sync::lock::Mutex but found type parameter) [E0095]

Where an error is displayed many times. This is weird.

@alexcrichton
Copy link
Member

I can't seem to reproduce this locally, do you have a repo that I could try this out on? It would preferably have a Cargo.lock checked in as well.

@reem
Copy link
Author

reem commented Aug 27, 2014

It happens intermittently, I'll save the next time it happens and update this issue.

@reem
Copy link
Author

reem commented Sep 3, 2014

@alexcrichton I've come across this error again and uploaded a test case here: https://github.com/reem/cargo-double-error It even includes a Cargo.lock, even though it has no deps.

That consistently gives this error message (note the double output for the error on L#33):

src/lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
src/lib.rs:33     replace_map(b, double);
                  ^~~~~~~~~~~
src/lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
src/lib.rs:33     replace_map(b, double);
                  ^~~~~~~~~~~
src/lib.rs:36:5: 36:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
src/lib.rs:36     replace_map(b, |&mut: x: uint| x * 2);
                  ^~~~~~~~~~~
src/lib.rs:39:5: 39:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
src/lib.rs:39     replace_map(b, |&: x: uint| x * 2);

I think this might be a rustc error, but I'm not sure.

@alexcrichton
Copy link
Member

This looks to be an error in rustc itself:

$ rustc --test src/lib.rs 
src/lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
src/lib.rs:33     replace_map(b, double);
                  ^~~~~~~~~~~
src/lib.rs:33:5: 33:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for fn(uint) -> uint
src/lib.rs:33     replace_map(b, double);
                  ^~~~~~~~~~~
src/lib.rs:36:5: 36:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
src/lib.rs:36     replace_map(b, |&mut: x: uint| x * 2);
                  ^~~~~~~~~~~
src/lib.rs:39:5: 39:16 error: failed to find an implementation of trait core::ops::FnOnce<(uint),uint> for closure
src/lib.rs:39     replace_map(b, |&: x: uint| x * 2);
                  ^~~~~~~~~~~
error: aborting due to 4 previous errors

Would you mind opening a bug in rust-lang/rust?

@reem
Copy link
Author

reem commented Sep 3, 2014

Done. rust-lang/rust#16966

@reem reem closed this as completed Sep 3, 2014
@alexcrichton
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants