summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed b/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed
new file mode 100644
index 000000000..5109511f9
--- /dev/null
+++ b/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed
@@ -0,0 +1,20 @@
+// run-rustfix
+
+trait Foo {}
+
+trait Bar {
+ fn hello(&self) {}
+}
+
+struct S;
+
+impl Foo for S {}
+impl Bar for S {}
+
+fn test(foo: impl Foo + Bar) {
+ foo.hello(); //~ ERROR E0599
+}
+
+fn main() {
+ test(S);
+}