]> git.proxmox.com Git - rustc.git/blobdiff - tests/ui/impl-trait/in-trait/specialization-broken.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / impl-trait / in-trait / specialization-broken.stderr
index 37cfd74498d81a97a92ee2108d796432d418a753..dc621d6b8a848ff1d92d0fa17a1092af20622696 100644 (file)
@@ -18,6 +18,14 @@ LL |     fn bar(&self) -> impl Sized;
    = note: expected signature `fn(&U) -> impl Sized`
               found signature `fn(&U) -> U`
 
-error: aborting due to previous error
+error: method with return-position `impl Trait` in trait cannot be specialized
+  --> $DIR/specialization-broken.rs:16:5
+   |
+LL |     fn bar(&self) -> U {
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = note: specialization behaves in inconsistent and surprising ways with `#![feature(return_position_impl_trait_in_trait)]`, and for now is disallowed
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0053`.