Closed
Description
// crate `derive`
// lib.proc-macro = true
#[proc_macro_derive(WellThen, attributes(well::then))]
pub fn derive(i: ::proc_macro::TokenStream) -> ::proc_macro::TokenStream {
i
}
// crate `user`
use derive::WellThen;
#[derive(WellThen)]
#[well::then]
struct A;
error[E0433]: failed to resolve. Use of undeclared type or module `well`
--> user\main.rs:3:3
|
3 | #[well::then]
| ^^^^ Use of undeclared type or module `well`
I would expect either for this to work or for #[proc_macro_derive(attributes(..))]
to reject a path and only accept an ident, as specifying a path here doesn't work.