These are chat archives for rust-lang/rust

May 2019
May 11 11:42
Could someone help me understand the error in below code:
use std::convert::TryFrom;

struct Age(u8);
// conflicting implementation in crate `core`:   - impl<T, U> std::convert::TryFrom<U> for T  where U: std::convert::Into<T>;
impl<T> TryFrom<T> for Age where T: AsRef<[u8]> {
    type Error = std::io::Error;
    fn try_from(t: T) -> Result<Self, Self::Error> {

fn main(){}
From trait implementation is working, like so. Not sure what's wrong with TryFrom:
impl<T> From<T> for Age where T: AsRef<[u8]> {
    fn from(t: T) -> Self {
Denis Lisov
May 11 11:59
This is unfortunately not possible, this implementation would conflict with the default blanket impl.
May 11 17:01
How to install npm latest be version in linux mint for web assembly