mbe: Implement unsafe attribute rules by joshtriplett · Pull Request #146535 · rust-lang/rust (original) (raw)

This implements unsafe attr rules for declarative macro_rules! attributes, as specified in RFC 3697.

An invocation of an attribute that uses an unsafe attr rule requires the unsafe(attr(...)) syntax.

An invocation of an attribute that uses an ordinary attr rule must not use the unsafe(attr(...)) syntax.

unsafe is only supported on an attr rule, not any other kind of macro_rules! rule.

Tracking issue for macro_rules! attributes: #143547