Skip to content

Commit

Permalink
Merge pull request #226 from dtolnay/format
Browse files Browse the repository at this point in the history
Call `format!` through an unambiguous path
  • Loading branch information
dtolnay committed Jun 20, 2022
2 parents cb2ba9f + a2389ee commit 7286307
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/format.rs
Expand Up @@ -129,7 +129,10 @@ macro_rules! format_ident {
macro_rules! format_ident_impl {
// Final state
([$span:expr, $($fmt:tt)*]) => {
$crate::__private::mk_ident(&format!($($fmt)*), $span)
$crate::__private::mk_ident(
&$crate::__private::format!($($fmt)*),
$span,
)
};

// Span argument
Expand Down
1 change: 1 addition & 0 deletions src/runtime.rs
Expand Up @@ -4,6 +4,7 @@ use std::iter;
use std::ops::BitOr;

pub use proc_macro2::*;
pub use std::format;

pub struct HasIterator; // True
pub struct ThereIsNoIteratorInRepetition; // False
Expand Down

0 comments on commit 7286307

Please sign in to comment.