Merge pull request #226 from dtolnay/format

Call `format!` through an unambiguous path
This commit is contained in:
David Tolnay 2022-06-19 19:12:11 -07:00 committed by GitHub
commit 72863076c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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