Tracking issue for #![register_attr] · Issue #66080 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@petrochenkov

Description

@petrochenkov

This is a direct replacement for now removed #![feature(custom_attribute)] (#29642), except it doesn't rely on implicit fallback from unresolved attributes to custom attributes (which was always hacky and is the primary reason for the removal of custom_attribute) and requires registering the attribute explicitly.

#![register_attr(my_attr)]

#[my_attr] // OK fn main() {}

It's not yet clear whether this should go through stabilization or not.
It's quite possible that all the uses should migrate to #![register_tool] (#66079) instead.