summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/upcast-wrong-substs.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/new-solver/upcast-wrong-substs.stderr')
-rw-r--r--tests/ui/traits/new-solver/upcast-wrong-substs.stderr14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/traits/new-solver/upcast-wrong-substs.stderr b/tests/ui/traits/new-solver/upcast-wrong-substs.stderr
new file mode 100644
index 000000000..8623f395f
--- /dev/null
+++ b/tests/ui/traits/new-solver/upcast-wrong-substs.stderr
@@ -0,0 +1,14 @@
+error[E0308]: mismatched types
+ --> $DIR/upcast-wrong-substs.rs:11:30
+ |
+LL | let y: &dyn Bar<usize> = x;
+ | --------------- ^ expected trait `Bar`, found trait `Foo`
+ | |
+ | expected due to this
+ |
+ = note: expected reference `&dyn Bar<usize>`
+ found reference `&dyn Foo`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.