diff options
| author | Marcelo DomÃnguez <69964857+Sa4dUs@users.noreply.github.com> | 2025-05-06 09:19:33 +0200 |
|---|---|---|
| committer | Marcelo DomÃnguez <dmmarcelo27@gmail.com> | 2025-05-20 11:58:26 +0000 |
| commit | b21c9e7bfb0180b67b486013a7137fb200cb1076 (patch) | |
| tree | 769762e6206c9f8618026eb6d213dbdbcd35af2f /library/core/src | |
| parent | f8e9e7636aabcbc29345d9614432d15b3c0c4ec7 (diff) | |
| download | rust-b21c9e7bfb0180b67b486013a7137fb200cb1076.tar.gz rust-b21c9e7bfb0180b67b486013a7137fb200cb1076.zip | |
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
```
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/lib.rs | 2 | ||||
| -rw-r--r-- | library/core/src/macros/mod.rs | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index e605d7e0d78..aaa8c872f98 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -229,7 +229,7 @@ pub mod assert_matches { /// Unstable module containing the unstable `autodiff` macro. pub mod autodiff { #[unstable(feature = "autodiff", issue = "124509")] - pub use crate::macros::builtin::autodiff; + pub use crate::macros::builtin::{autodiff_forward, autodiff_reverse}; } #[unstable(feature = "contracts", issue = "128044")] diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index 7dc8c060cd5..dc50ad6a090 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -1536,6 +1536,20 @@ pub(crate) mod builtin { /* compiler built-in */ } + #[unstable(feature = "autodiff", issue = "124509")] + #[allow_internal_unstable(rustc_attrs)] + #[rustc_builtin_macro] + pub macro autodiff_forward($item:item) { + /* compiler built-in */ + } + + #[unstable(feature = "autodiff", issue = "124509")] + #[allow_internal_unstable(rustc_attrs)] + #[rustc_builtin_macro] + pub macro autodiff_reverse($item:item) { + /* compiler built-in */ + } + /// Asserts that a boolean expression is `true` at runtime. /// /// This will invoke the [`panic!`] macro if the provided expression cannot be |
