Module codegen_attrs

Module codegen_attrs 

Source

StructsΒ§

InterestingAttributeDiagnosticSpans πŸ”’
Spans that are collected when processing built-in attributes, that are useful for emitting diagnostics later.

FunctionsΒ§

apply_overrides πŸ”’
Applies overrides for codegen fn attrs. These often have a specific reason why they’re necessary. Please comment why when adding a new one!
autodiff_attrs
We now check the #[rustc_autodiff] attributes which we generated from the #[autodiff(…)] macros. There are two forms. The pure one without args to mark primal functions (the functions being differentiated). The other form is #[rustc_autodiff(Mode, ActivityList)] on top of the placeholder functions. We wrote the rustc_autodiff attributes ourself, so this should never panic, unless we introduced a bug when parsing the autodiff macro.
check_result πŸ”’
codegen_fn_attrs πŸ”’
Generate the CodegenFnAttrs for an item (identified by the LocalDefId).
disabled_sanitizers_for πŸ”’
handle_lang_items πŸ”’
inherited_align πŸ”’
If the provided DefId is a method in a trait impl, return the value of the #[align] attribute on the method prototype (if any).
parse_instruction_set_attr πŸ”’
parse_patchable_function_entry πŸ”’
process_builtin_attrs πŸ”’
Process the builtin attrs (hir::Attribute) on the item. Many of them directly translate to codegen attrs.
provide πŸ”’
should_inherit_track_caller πŸ”’
Checks if the provided DefId is a method in a trait impl for a trait which has track_caller applied to the method prototype.
try_fn_sig πŸ”’
In some cases, attributes are only valid on functions, but it’s the check_attr pass that checks that they aren’t used anywhere else, rather than this module. In these cases, we bail from performing further checks that are only meaningful for functions (such as calling fn_sig, which ICEs if given a non-function). We also report a delayed bug, just in case check_attr isn’t doing its job.