// run-rustfix use std::fmt::Debug; use std::marker::PhantomData; use std::convert::{self, TryFrom}; #[allow(unused)] struct Codec { phantom_decode: PhantomData, phantom_encode: PhantomData, } pub enum ParseError {} impl Codec where DecodeLine: Debug + convert::TryFrom, >::Error: ParseError, //~^ ERROR expected trait, found enum `ParseError` //~| HELP constrain the associated type to `ParseError` { } impl Codec where DecodeLine: Debug + TryFrom, >::Error: ParseError, //~^ ERROR expected trait, found enum `ParseError` //~| HELP constrain the associated type to `ParseError` { } fn main() {}