summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/associated-type-projection-from-supertrait.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/associated-types/associated-type-projection-from-supertrait.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/associated-types/associated-type-projection-from-supertrait.stderr')
-rw-r--r--src/test/ui/associated-types/associated-type-projection-from-supertrait.stderr59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/associated-type-projection-from-supertrait.stderr b/src/test/ui/associated-types/associated-type-projection-from-supertrait.stderr
new file mode 100644
index 000000000..b904ad102
--- /dev/null
+++ b/src/test/ui/associated-types/associated-type-projection-from-supertrait.stderr
@@ -0,0 +1,59 @@
+error[E0308]: mismatched types
+ --> $DIR/associated-type-projection-from-supertrait.rs:27:23
+ |
+LL | fn b() { dent(ModelT, Blue); }
+ | ---- ^^^^ expected struct `Black`, found struct `Blue`
+ | |
+ | arguments to this function are incorrect
+ |
+note: function defined here
+ --> $DIR/associated-type-projection-from-supertrait.rs:25:4
+ |
+LL | fn dent<C:Car>(c: C, color: C::Color) { c.chip_paint(color) }
+ | ^^^^ ---- ---------------
+
+error[E0308]: mismatched types
+ --> $DIR/associated-type-projection-from-supertrait.rs:28:23
+ |
+LL | fn c() { dent(ModelU, Black); }
+ | ---- ^^^^^ expected struct `Blue`, found struct `Black`
+ | |
+ | arguments to this function are incorrect
+ |
+note: function defined here
+ --> $DIR/associated-type-projection-from-supertrait.rs:25:4
+ |
+LL | fn dent<C:Car>(c: C, color: C::Color) { c.chip_paint(color) }
+ | ^^^^ ---- ---------------
+
+error[E0308]: mismatched types
+ --> $DIR/associated-type-projection-from-supertrait.rs:32:28
+ |
+LL | fn f() { ModelT.chip_paint(Blue); }
+ | ---------- ^^^^ expected struct `Black`, found struct `Blue`
+ | |
+ | arguments to this function are incorrect
+ |
+note: associated function defined here
+ --> $DIR/associated-type-projection-from-supertrait.rs:12:8
+ |
+LL | fn chip_paint(&self, c: Self::Color) { }
+ | ^^^^^^^^^^ ----- --------------
+
+error[E0308]: mismatched types
+ --> $DIR/associated-type-projection-from-supertrait.rs:33:28
+ |
+LL | fn g() { ModelU.chip_paint(Black); }
+ | ---------- ^^^^^ expected struct `Blue`, found struct `Black`
+ | |
+ | arguments to this function are incorrect
+ |
+note: associated function defined here
+ --> $DIR/associated-type-projection-from-supertrait.rs:12:8
+ |
+LL | fn chip_paint(&self, c: Self::Color) { }
+ | ^^^^^^^^^^ ----- --------------
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0308`.