From 28ce2924f15983ad31c44cc432aa17f217c3a131 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 6 Jul 2017 15:20:01 -0700 Subject: [PATCH] Add `isize` and `usize` constructors to Literal This commit fills out the remaining integer literal constructors on the `proc_macro::Literal` type with `isize` and `usize`. (I think these were just left out by accident) --- src/libproc_macro/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 06f9634d70613..357e2ab853cbb 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -303,7 +303,7 @@ impl Literal { Literal(token::Literal(token::Lit::Integer(Symbol::intern(&n.to_string())), None)) } - int_literals!(u8, i8, u16, i16, u32, i32, u64, i64); + int_literals!(u8, i8, u16, i16, u32, i32, u64, i64, usize, isize); fn typed_integer(n: i128, kind: &'static str) -> Literal { Literal(token::Literal(token::Lit::Integer(Symbol::intern(&n.to_string())), Some(Symbol::intern(kind))))