diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
commit | a0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch) | |
tree | fc451898ccaf445814e26b46664d78702178101d /tests/ui/resolve/issue-112472-multi-generics-suggestion.rs | |
parent | Adding debian version 1.71.1+dfsg1-2. (diff) | |
download | rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/resolve/issue-112472-multi-generics-suggestion.rs')
-rw-r--r-- | tests/ui/resolve/issue-112472-multi-generics-suggestion.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs b/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs new file mode 100644 index 000000000..2b2f5f1ad --- /dev/null +++ b/tests/ui/resolve/issue-112472-multi-generics-suggestion.rs @@ -0,0 +1,31 @@ +// run-rustfix + +use std::fmt::Debug; +use std::marker::PhantomData; +use std::convert::{self, TryFrom}; + +#[allow(unused)] +struct Codec<EncodeLine, DecodeLine> { + phantom_decode: PhantomData<DecodeLine>, + phantom_encode: PhantomData<EncodeLine>, +} + +pub enum ParseError {} + +impl<EncodeLine, DecodeLine> Codec<EncodeLine, DecodeLine> where + DecodeLine: Debug + convert::TryFrom<String>, + <DecodeLine as convert::TryFrom<String>>::Error: ParseError, + //~^ ERROR expected trait, found enum `ParseError` + //~| HELP constrain the associated type to `ParseError` +{ +} + +impl<EncodeLine, DecodeLine> Codec<EncodeLine, DecodeLine> where + DecodeLine: Debug + TryFrom<String>, + <DecodeLine as TryFrom<String>>::Error: ParseError, + //~^ ERROR expected trait, found enum `ParseError` + //~| HELP constrain the associated type to `ParseError` +{ +} + +fn main() {} |