fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
865 B31 linesraw
1// run-rustfix
2
3use std::fmt::Debug;
4use std::marker::PhantomData;
5use std::convert::{self, TryFrom};
6
7#[allow(unused)]
8struct Codec<EncodeLine, DecodeLine> {
9    phantom_decode: PhantomData<DecodeLine>,
10    phantom_encode: PhantomData<EncodeLine>,
11}
12
13pub enum ParseError {}
14
15impl<EncodeLine, DecodeLine> Codec<EncodeLine, DecodeLine> where
16    DecodeLine: Debug + convert::TryFrom<String>,
17    DecodeLine: convert::TryFrom<String, Error = ParseError>,
18    //~^ ERROR expected trait, found enum `ParseError`
19    //~| HELP constrain the associated type to `ParseError`
20{
21}
22
23impl<EncodeLine, DecodeLine> Codec<EncodeLine, DecodeLine> where
24    DecodeLine: Debug + TryFrom<String>,
25    DecodeLine: TryFrom<String, Error = ParseError>,
26    //~^ ERROR expected trait, found enum `ParseError`
27    //~| HELP constrain the associated type to `ParseError`
28{
29}
30
31fn main() {}