Skip to content

"help: possible candidate is found in another module" points to incorrect Span #44514

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

Closed
SergioBenitez opened this issue Sep 12, 2017 · 2 comments

Comments

@SergioBenitez
Copy link
Contributor

Consider the following error:

error[E0412]: cannot find type `Formatter` in this scope
  --> src/main.rs:17:27
   |
17 |     fn fmt(&self, f: &mut Formatter) -> fmt::Result {
   |                           ^^^^^^^^^ not found in this scope
   |
help: possible candidate is found in another module, you can import it into scope
   |
11 | #[derive(use std::fmt::Formatter;
   |

This should be:

help: possible candidate is found in another module, you can import it into scope
   |
- 11 | #[derive(use std::fmt::Formatter;
   |

help: possible candidate is found in another module, you can import it into scope
   |
+ 11 | use std::fmt::Formatter;
   |

The #[derive( bit should not be there.

This issue has been occurring for at least the last ~7 nightlies.

@zackmdavis
Copy link
Member

Duplicate of #44210?

@SergioBenitez
Copy link
Contributor Author

Looks like it! I'll close this out.

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