Skip to content

Commit

Permalink
Link to rustc PR for negative literal parse
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 26, 2021
1 parent a7eedc1 commit 3609334
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ mod value {
pub fn to_literal(repr: &str, digits: &str, suffix: &str) -> Option<Literal> {
#[cfg(syn_no_negative_literal_parse)]
{
// Rustc older than https://github.com/rust-lang/rust/pull/87262.
if repr.starts_with('-') {
let f64_parse_finite = || digits.parse().ok().filter(|x: &f64| x.is_finite());
let f32_parse_finite = || digits.parse().ok().filter(|x: &f32| x.is_finite());
Expand Down

0 comments on commit 3609334

Please sign in to comment.