about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/deriving
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-08-04 17:24:18 +0200
committerJakub Beránek <berykubik@gmail.com>2025-08-15 12:06:20 +0200
commite935a155c2078185f0705bb972a38953e770e393 (patch)
tree86f4aa3d98fa77383bf0a2fb57dff0aac7eb7af1 /compiler/rustc_builtin_macros/src/deriving
parentf39085bb372f00b5b6849001e947727c9dc77ba3 (diff)
downloadrust-e935a155c2078185f0705bb972a38953e770e393.tar.gz
rust-e935a155c2078185f0705bb972a38953e770e393.zip
Create unstable `From` builtin macro and register it
Diffstat (limited to 'compiler/rustc_builtin_macros/src/deriving')
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/from.rs13
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/mod.rs1
2 files changed, 14 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/from.rs b/compiler/rustc_builtin_macros/src/deriving/from.rs
new file mode 100644
index 00000000000..79fd4caa440
--- /dev/null
+++ b/compiler/rustc_builtin_macros/src/deriving/from.rs
@@ -0,0 +1,13 @@
+use rustc_ast as ast;
+use rustc_expand::base::{Annotatable, ExtCtxt};
+use rustc_span::{Span, sym};
+
+pub(crate) fn expand_deriving_from(
+    cx: &ExtCtxt<'_>,
+    span: Span,
+    mitem: &ast::MetaItem,
+    item: &Annotatable,
+    push: &mut dyn FnMut(Annotatable),
+    is_const: bool,
+) {
+}
diff --git a/compiler/rustc_builtin_macros/src/deriving/mod.rs b/compiler/rustc_builtin_macros/src/deriving/mod.rs
index 1edc2965def..cee6952fa34 100644
--- a/compiler/rustc_builtin_macros/src/deriving/mod.rs
+++ b/compiler/rustc_builtin_macros/src/deriving/mod.rs
@@ -23,6 +23,7 @@ pub(crate) mod clone;
 pub(crate) mod coerce_pointee;
 pub(crate) mod debug;
 pub(crate) mod default;
+pub(crate) mod from;
 pub(crate) mod hash;
 
 #[path = "cmp/eq.rs"]