jfecher / jfecher/inc-complete

Derive macros require implementation details to be imported

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Rust
Stars
17
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Using a derive macro such as the derive for `Input` gives a compile error alone:
```rs
use inc_complete::Input;

#[derive(Input)]
#[inc_complete(id = 0, output = i32, storage = Foo)]
struct MyInput;
```
Gives:
```
error: cannot find macro `define_input` in this scope
--> src/main.rs:3:10
|
3 | #[derive(Input)]
| ^^^^^
|
= note: this error originates in the macro `inc_complete::define_input` which comes from the expansion of the derive macro `Input` (in Nightly builds, run with -Z macro-backtra
ce for more info)
help: consider importing this macro
|
1 + use inc_complete::define_input;
|
```
Which is not clear to users since this is an implementation detail of the derive macro

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.