-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Declarative macros: no error about duplicate trait items #71614
Copy link
Copy link
Closed
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-decl_macro`#![feature(decl_macro)]``#![feature(decl_macro)]`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.
Metadata
Metadata
Assignees
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-decl_macro`#![feature(decl_macro)]``#![feature(decl_macro)]`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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code on the latest nightly:
I expected to see this happen: an error about
type Tbeing defined twice in the same impl. (This is what happens withmacro_rules! trait_impl.)Instead, this happened: the code just compiles. The same also works when considering a function rather than a type.