Strange mismatched type between core and std on beta


I have just started to convert one project from Rust Nightly to Rust Beta-3, and I’m blocking with this:

use std::num::ParseFloatError;
use std::str::FromStr;

pub enum ParseError {

fn test() -> Result<f32, ParseError>{

    let value = match f32::from_str("1.0") {
        Ok(v) => v,
        Err(e) => return Err(ParseError::InvalidValue(e)),


fn main() {
$ rustc 13:56 error: mismatched types:
 expected `std::num::ParseFloatError`,
    found `core::num::ParseFloatError`
(expected struct `std::num::ParseFloatError`,
    found struct `core::num::ParseFloatError`) [E0308]         Err(e) => return Err(ParseError::InvalidValue(e)),
error: aborting due to previous error

It is a rust bug? Or something wrong with my code?


You may be hitting this issue, which came to light in this StackOverflow question.