Skip to content

derive_more imports not found #6183

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
Timmmm opened this issue Oct 9, 2020 · 4 comments
Closed

derive_more imports not found #6183

Timmmm opened this issue Oct 9, 2020 · 4 comments

Comments

@Timmmm
Copy link
Contributor

Timmmm commented Oct 9, 2020

In Cargo.toml dependencies:

derive_more = "0.99.10"

In code:

use derive_more::{From, Into, Add, AddAssign, Sum};

Using the VSCode extension it highlights all of the imports (From, Into, etc.) as unresolved import.

@bjorn3
Copy link
Member

bjorn3 commented Oct 9, 2020

You can enable proc-macro support using

{
    "rust-analyzer.cargo.loadOutDirsFromCheck": true,
    "rust-analyzer.procMacro.enable": true,
}

@Timmmm
Copy link
Contributor Author

Timmmm commented Oct 9, 2020

Ooo thanks, presumably there's some downside that explains why this isn't enabled by default?

@lnicola
Copy link
Member

lnicola commented Oct 9, 2020

#6053 (comment)

@Timmmm
Copy link
Contributor Author

Timmmm commented Oct 9, 2020

Ah, slower. Got it.

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

3 participants