summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/lib.rs
diff options
context:
space:
mode:
authorManuel Drehwald <git@manuel.drehwald.info>2024-10-11 19:13:31 +0200
committerManuel Drehwald <git@manuel.drehwald.info>2024-10-11 19:13:31 +0200
commit624c071b997f3bab0ef086af24f59ebc95f37c59 (patch)
tree44091cd44e62db9aa4d0f0b6053de7b84769a5cb /compiler/rustc_builtin_macros/src/lib.rs
parent52fd9983996d9fcfb719749838336be66dee68f9 (diff)
downloadrust-624c071b997f3bab0ef086af24f59ebc95f37c59.tar.gz
rust-624c071b997f3bab0ef086af24f59ebc95f37c59.zip
Single commit implementing the enzyme/autodiff frontend
Co-authored-by: Lorenz Schmidt <bytesnake@mailbox.org>
Diffstat (limited to 'compiler/rustc_builtin_macros/src/lib.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/src/lib.rs b/compiler/rustc_builtin_macros/src/lib.rs
index ebe5e2b5442..377d7f542cf 100644
--- a/compiler/rustc_builtin_macros/src/lib.rs
+++ b/compiler/rustc_builtin_macros/src/lib.rs
@@ -5,6 +5,7 @@
 #![allow(internal_features)]
 #![allow(rustc::diagnostic_outside_of_impl)]
 #![allow(rustc::untranslatable_diagnostic)]
+#![cfg_attr(not(bootstrap), feature(autodiff))]
 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
 #![doc(rust_logo)]
 #![feature(assert_matches)]
@@ -29,6 +30,7 @@ use crate::deriving::*;
 
 mod alloc_error_handler;
 mod assert;
+mod autodiff;
 mod cfg;
 mod cfg_accessible;
 mod cfg_eval;
@@ -106,6 +108,7 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) {
 
     register_attr! {
         alloc_error_handler: alloc_error_handler::expand,
+        autodiff: autodiff::expand,
         bench: test::expand_bench,
         cfg_accessible: cfg_accessible::Expander,
         cfg_eval: cfg_eval::expand,