Change to integer parsing in nightly?


On stable and beta, this code:

fn main() {
    let x: Result<u32, _> = "+1".parse();
    println!("{:?}", x);

prints Err(ParseIntError { kind: InvalidDigit }); on nightly it prints Ok(1). Is this intentional? Announced?

playpen link


It happened (intentionally) in #28826. There’s even a comment:

I’m adding to relnotes, and we should advertise this change widely when it lands since it’s a visible behavioral change.

but the delay between the comment and the actual landing probably meant it slipped off the radar… until now. (Thanks for the reminder!)