-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-proc-macrosArea: Procedural macrosArea: Procedural macrosA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I tried this code:
#[derive(Debug, Component, Clone, Copy)]
#[storage(VecStorage)]
pub struct Position {
x: u8,
y: u8,
z: u8,
}
I expected to see this happen: compiler should suggest importing Component
from specs
(it is in Cargo.toml).
Instead, this happened: compiler say cannot find macro 'Component' but did not suggest importing it like other functions
error: cannot find derive macro `Component` in this scope
--> src/main.rs:34:10
|
34 | #[derive(Component)]
| ^^^^^^^^^
Meta
rustc --version --verbose
:
rustc 1.47.0-nightly (d8cbd9cac 2020-08-03)
binary: rustc
commit-hash: d8cbd9caca648ecdb66ff4c945c060762aa6297f
commit-date: 2020-08-03
host: x86_64-unknown-linux-gnu
release: 1.47.0-nightly
LLVM version: 10.0
Also not available in stable.
jyn514
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-proc-macrosArea: Procedural macrosArea: Procedural macrosA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.