Skip to content

Commit

Permalink
Fix build with 1.81
Browse files Browse the repository at this point in the history
As of 1.81, `stringify` appears to always insert spaces between tokens,
resulting in type names like `std :: io :: File`. Switching to `concat`
avoids this issue.

Due to the use of `local_inner_macros`, we fully qualify `concat` and
`stringify` in the definition of `field_decl_inner`.
  • Loading branch information
iriri committed Dec 3, 2024
1 parent 8fc42d7 commit 41b9278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/src/api/mac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ macro_rules! field_decl_inner {
record_field_inner_struct!{ $field $($suffix)* }
impl $crate::api::record::Field for last_ident!($field $($suffix)*) {
fn name() -> &'static str {
stringify_inner!($field $( :: $suffix)* )
::std::concat!(::std::stringify!($field), $("::", ::std::stringify!($suffix)),*)
}
fn args() -> &'static [&'static str] {
&[$(stringify_inner!($args)),*]
Expand Down

0 comments on commit 41b9278

Please sign in to comment.