Skip to content

Commit fcfcd6b

Browse files
committed
Split autodiff into autodiff_forward and autodiff_reverse
Pending fix. ``` error: cannot find a built-in macro with name `autodiff_forward` --> library\core\src\macros\mod.rs:1542:5 | 1542 | / pub macro autodiff_forward($item:item) { 1543 | | /* compiler built-in */ 1544 | | } | |_____^ error: cannot find a built-in macro with name `autodiff_reverse` --> library\core\src\macros\mod.rs:1549:5 | 1549 | / pub macro autodiff_reverse($item:item) { 1550 | | /* compiler built-in */ 1551 | | } | |_____^ error: could not compile `core` (lib) due to 2 previous errors ```
1 parent be91512 commit fcfcd6b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ pub mod assert_matches {
229229
/// Unstable module containing the unstable `autodiff` macro.
230230
pub mod autodiff {
231231
#[unstable(feature = "autodiff", issue = "124509")]
232-
pub use crate::macros::builtin::autodiff;
232+
pub use crate::macros::builtin::{autodiff_forward, autodiff_reverse};
233233
}
234234

235235
#[unstable(feature = "contracts", issue = "128044")]

core/src/macros/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,20 @@ pub(crate) mod builtin {
15361536
/* compiler built-in */
15371537
}
15381538

1539+
#[unstable(feature = "autodiff", issue = "124509")]
1540+
#[allow_internal_unstable(rustc_attrs)]
1541+
#[rustc_builtin_macro]
1542+
pub macro autodiff_forward($item:item) {
1543+
/* compiler built-in */
1544+
}
1545+
1546+
#[unstable(feature = "autodiff", issue = "124509")]
1547+
#[allow_internal_unstable(rustc_attrs)]
1548+
#[rustc_builtin_macro]
1549+
pub macro autodiff_reverse($item:item) {
1550+
/* compiler built-in */
1551+
}
1552+
15391553
/// Asserts that a boolean expression is `true` at runtime.
15401554
///
15411555
/// This will invoke the [`panic!`] macro if the provided expression cannot be

0 commit comments

Comments
 (0)