NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #9 most downloaded on crates.io
Quasi-quoting macro quote!(...)
Latest stable
1.0.47
Last release 4 months ago
19 Jul 2026
Release timing varies
gaps range from 8 days to 7 months
Most releases are documented
notes for 47 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
95 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Update to proc-macro2 0.4 which tracks the procedural macro API in the nightly compiler
quote::Tokens type and replace with proc_macro2::TokenStreamquote::Tokens to a quote::TokenStreamExt extension traitAllow interpolating proc_macro2::Op and proc_macro2::Group
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
- Update to proc-macro2 0.3
Implement PartialEq and Hash for quote::Tokens
Add an impl IntoIterator for Tokens, allowing a Tokens to be passed to Tokens::append_all (thanks @eijebong)
Rewrite to produce Macros 2.0-style token streams rather than strings of source code. Check the readme.
Allow appending Tokens to Tokens (#29, thanks @colin-kiegel)
Allow appending Tokens to Tokens (#29, thanks @colin-kiegel)
tokens.append(quote! {
/* ... */
});
- Add Tokens::into_string
Include license files in crates.io archive
Allow values of type Cow to be interpolated inside quote!{...}
Fix escaping within byte strings; they need to be escaped like b"\xCF\x83" rather than b"\u{3c3}"
b"\xCF\x83" rather than b"\u{3c3}"Workaround for rust-lang/rust#19630 to support compiling on Rust 1.11.0
Three contributions from @SimonSapin:
Three contributions from @SimonSapin:
Add quote::Ident for interpolating an identifier (#17)
let s = quote::Ident::new("S");
let tokens = quote! { struct #s; };
let expected = "struct Foo ;";
assert_eq!(expected, tokens.to_string());
Allow interpolating tuples, &[T] and Vec<T> (#18)
let v: &[u32] = &[1, 2, 3];
let tokens = quote! { let v = vec! #v; }
let expected = "let v = vec ! [ 1u32 , 2u32 , 3u32 , ] ;";
assert_eq!(expected, tokens.to_string());
Add quote::Hex for interpolating integers in hexadecimal representation (#19)
let hex = quote::Hex(0xFFFF_0000_u32);
let tokens = quote! { #hex };
let expected = "0xFFFF0000u32";
assert_eq!(expected, tokens.to_string());
Add Tokens::parse (&self) -> Result
Tokens::parse<T: FromStr>(&self) -> Result<T, T::Err>Add Tokens::as_str(&self) -> &str to get a string without copying
Tokens::as_str(&self) -> &str to get a string without copyingSupport #v inside quote!(...) where v is a &T or Box and T is dynamically sized
#v inside quote!(...) where v is a &T or Box<T> and T is dynamically sizedUse \0 as the escape sequence for the zero byte when quoting characters, strings and byte strings rather than \x00 or \u{0}
\0 as the escape sequence for the zero byte when quoting characters, strings and byte strings rather than \x00 or \u{0}Allow equality comparison of Tokens by implementing Eq, which is now more meaningful since the whitespace-related fixes in 0.3.1 and 0.3.3
Avoid one more case of extra spaces (#9, thanks @mystor)
Support empty quote!() call. It returns an empty tokens string. (#6, thanks @mystor)
quote!() call. It returns an empty tokens string. (#6, thanks @mystor)Avoid extra spaces in the tokens string. Previously some token strings would have 2 or 3 consecutive spaces in places. Now there will always be 1 spac
quote! macro. (#5, thanks @mystor)Extend the repetition syntax and align it more closely with the style of macro_rules! repetitions. This is a *breaking change* and code that used to l…
macro_rules! repetitions. This is a breaking change and code that used to look like #(var)* needs to be updated to #(#var)*.Some examples of the new repetition style:
let keys = vec!["a", "b"];
let values = vec![true, false];
// "a": true, "b": false
quote! {
#(#keys: #values),*
}
let nested = vec![
vec!['a', 'b', 'c'],
vec!['x', 'y', 'z'],
];
// 'a' 'b' 'c', 'x' 'y' 'z'
quote! {
#(
#(#nested)*
),*
}
In general it should feel just like macro_rules! repetitions except with # instead of $. The remaining limitations are:
#a is repeating (like a Vec) and #b is not, then quote! { #(#a #b)* } will not work. Ideally it would insert the same #b for each #a the way macro_rules! does but I have not figured this out yet. For now you can explicitly repeat b using std::iter::repeat.quote! { #a #a } continues to work as before but I have not figured out a way to support quote! { #(#a #a)* }.Nothing published for this version
Nothing published for this version
Add helpers `append_all` and `append_terminated` to simplify ToTokens implementations.
append_all and append_terminated to simplify ToTokens implementations.Allow types other than Vec to be used with the $(var)* syntax
Vec to be used with the $(var)* syntaxAdd an impl allowing Box to be quoted as though it were T.
Add an impl allowing Box<T> to be quoted as though it were T.
let b = Box::new(x);
quote! {
original: #x,
boxed: #b // same as original
}
This release changes the handling of primitive integer and floating point types to match the behavior of `quasi`.
This release changes the handling of primitive integer and floating point types to match the behavior of quasi.
let int: u64 = 100;
quote!(#int)
In 0.1 this would quote as "100". In 0.2 it quotes as "100u64". Similar for i8, i16, i32, i64, isize, u8, u16, u32, usize, f32, f64.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.