Re-exportsยง
use std::borrow::Cow;๐use rustc_ast::AttrStyle;๐use rustc_ast::Safety;๐use rustc_attr_ir::target::AssocCtxt;๐use rustc_attr_ir::target::MethodKind;๐use rustc_attr_ir::target::Target;๐use rustc_attr_ir::AttrItem;๐use rustc_attr_ir::Attribute;๐use rustc_attr_ir::AttributeKind;๐use rustc_errors::DiagArgValue;๐use rustc_errors::MultiSpan;๐use rustc_errors::StashKey;๐use rustc_feature::Features;๐use rustc_lint_defs::builtin::INVALID_DOC_ATTRIBUTES;๐use rustc_lint_defs::builtin::MISPLACED_DIAGNOSTIC_ATTRIBUTES;๐use rustc_lint_defs::builtin::UNUSED_ATTRIBUTES;๐use rustc_lint_defs::builtin::USELESS_DEPRECATED;๐use rustc_span::BytePos;๐use rustc_span::FileName;๐use rustc_span::RemapPathScopeComponents;๐use rustc_span::Span;๐use rustc_span::Symbol;๐use rustc_span::sym;๐use crate::context::AcceptContext;๐use crate::diagnostics::InvalidAttrAtCrateLevel;๐use crate::diagnostics::InvalidTarget;๐use crate::diagnostics::InvalidTargetHelp;๐use crate::diagnostics::ItemFollowingInnerAttr;๐use crate::diagnostics::UnsupportedAttributesInWhere;๐use crate::target_checking::Policy::Allow;๐use crate::AttributeParser;๐use crate::ShouldEmit;๐
Enumsยง
- Allowed
Result ๐ - Allowed
Targets ๐ - Policy ๐
- This policy determines what diagnostics should be emitted based on the
Targetof the attribute.
Constantsยง
- ALL_
TARGETS ๐ - This is the list of all targets to which a attribute can be applied This is used for:
Functionsยง
- allowed_
targets_ ๐applied - Takes a list of
allowed_targetsfor an attribute, and thetargetthe attribute was applied to. Does some heuristic-based filtering to remove uninteresting targets, and formats the targets into a string - filter_
targets ๐