diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index 3cd2337ee59a5..16045f64d461e 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -438,16 +438,16 @@ pub trait TryInto: Sized { /// ``` /// use std::convert::TryFrom; /// -/// struct SuperiorThanZero(i32); +/// struct GreaterThanZero(i32); /// -/// impl TryFrom for SuperiorThanZero { +/// impl TryFrom for GreaterThanZero { /// type Error = &'static str; /// /// fn try_from(value: i32) -> Result { -/// if value < 0 { -/// Err("SuperiorThanZero only accepts value superior than zero!") +/// if value <= 0 { +/// Err("GreaterThanZero only accepts value superior than zero!") /// } else { -/// Ok(SuperiorThanZero(value)) +/// Ok(GreaterThanZero(value)) /// } /// } /// }