Skip to content

Duplicate Errors #16966

New issue

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

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

Already on GitHub? # to your account

Closed
reem opened this issue Sep 3, 2014 · 1 comment · Fixed by #19780
Closed

Duplicate Errors #16966

reem opened this issue Sep 3, 2014 · 1 comment · Fixed by #19780
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@reem
Copy link
Contributor

reem commented Sep 3, 2014

Rustc sometimes recognizes and logs the same error multiple times.

Test case: https://gist.github.com/reem/78db1ad233f1c87f9ca7

rustc --test consistently logs (note the double report on the L#33 error):

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

treeman commented Sep 15, 2014

Related test case from #11382, repeating it here for clarity:

fn main() { fail!(1.2); }

Gives

<std macros>:8:9: 8:32 error: cannot determine a type for this bounded type parameter: cannot determine the type of this number; add a suffix to specify the type explicitly
<std macros>:8         ::std::rt::begin_unwind($msg, &_FILE_LINE)
                       ^~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 34:2 note: in expansion of fail!
tst.rs:1:13: 1:24 note: expansion site
<std macros>:8:9: 8:32 error: cannot determine a type for this bounded type parameter: cannot determine the type of this number; add a suffix to specify the type explicitly
<std macros>:8         ::std::rt::begin_unwind($msg, &_FILE_LINE)
                       ^~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 34:2 note: in expansion of fail!
tst.rs:1:13: 1:24 note: expansion site
error: aborting due to 2 previous errors

@ghost ghost added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Nov 19, 2014
bors added a commit that referenced this issue Dec 18, 2014
Closes #5988.
Closes #10176.
Closes #10456.
Closes #12744.
Closes #13264.
Closes #13324.
Closes #14182.
Closes #15381.
Closes #15444.
Closes #15480.
Closes #15756.
Closes #16822.
Closes #16966.
Closes #17351.
Closes #17503.
Closes #17545.
Closes #17771.
Closes #17816.
Closes #17897.
Closes #17905.
Closes #18188.
Closes #18232.
Closes #18345.
Closes #18389.
Closes #18400.
Closes #18502.
Closes #18611.
Closes #18783.
Closes #19009.
Closes #19081.
Closes #19098.
Closes #19127.
Closes #19135.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants