1
Fork 0

Migrate offset_of from a macro to builtin # syntax

This commit is contained in:
est31 2023-04-22 16:29:34 +02:00
parent 59ecbd2cea
commit 5eb29c7f49
15 changed files with 213 additions and 136 deletions

View file

@ -556,8 +556,7 @@ impl<'a> State<'a> {
self.pclose();
}
ast::ExprKind::OffsetOf(container, fields) => {
// FIXME: This should have its own syntax, distinct from a macro invocation.
self.word("offset_of!");
self.word("builtin # offset_of");
self.popen();
self.rbox(0, Inconsistent);
self.print_type(container);