"Does anyone know if there's a..." <- > <@ryan-summers:matrix.org> Does anyone know if there's a mechanism to provide a default trait implementation with associated type that just returns errors? > > ```rs > pub trait MyTrait { > type Error = &'static str; > fn trait_func(&self) -> Result<(), Self::Error> { > Err("Not implemented") > } > } > ``` > > This currently doesn't work because you can't have an associated type default do you need the error to be generic? I guess that could never work if the impl changes the error type and the "default" still returns Result<(),&str>