diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed b/src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed new file mode 100644 index 000000000..a0cb39a3f --- /dev/null +++ b/src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed @@ -0,0 +1,21 @@ +// run-rustfix +trait TraitB { + type Item; +} + +trait TraitA<A> { + type Type; + fn bar<T>(_: T) -> Self; + fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy; +} + +struct S; +struct Type; + +impl TraitA<()> for S { //~ ERROR not all trait items implemented +fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy { todo!() } +fn bar<T>(_: T) -> Self { todo!() } +type Type = Type; +} + +fn main() {} |