Skip to content

Commit 28ce292

Browse files
committed
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)
1 parent 4d526e0 commit 28ce292

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libproc_macro/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ impl Literal {
303303
Literal(token::Literal(token::Lit::Integer(Symbol::intern(&n.to_string())), None))
304304
}
305305

306-
int_literals!(u8, i8, u16, i16, u32, i32, u64, i64);
306+
int_literals!(u8, i8, u16, i16, u32, i32, u64, i64, usize, isize);
307307
fn typed_integer(n: i128, kind: &'static str) -> Literal {
308308
Literal(token::Literal(token::Lit::Integer(Symbol::intern(&n.to_string())),
309309
Some(Symbol::intern(kind))))

0 commit comments

Comments
 (0)