]> git.proxmox.com Git - rustc.git/blobdiff - tests/ui/impl-trait/in-trait/default-body-type-err.next.stderr
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / ui / impl-trait / in-trait / default-body-type-err.next.stderr
diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err.next.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err.next.stderr
new file mode 100644 (file)
index 0000000..c949168
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
+  --> $DIR/default-body-type-err.rs:10:22
+   |
+LL |     fn lol(&self) -> impl Deref<Target = String> {
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`
+LL |
+LL |         &1i32
+   |         ----- return type was inferred to be `&i32` here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0271`.