-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
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.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.