]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/cast/casts-differing-anon.stderr
Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton
[rust.git] / src / test / ui / cast / casts-differing-anon.stderr
index 2d08903c5ef69c39b6007a32eb2ddf33f4cfd53f..f9abfb5225f91c3f5b1fd693f14c6cb245887fed 100644 (file)
@@ -1,19 +1,11 @@
-error[E0308]: mismatched types
+error[E0606]: casting `*mut impl Debug + ?Sized` as `*mut impl Debug + ?Sized` is invalid
   --> $DIR/casts-differing-anon.rs:21:13
    |
-LL | fn foo() -> Box<impl fmt::Debug+?Sized> {
-   |                 ---------------------- the found opaque type
-...
-LL | fn bar() -> Box<impl fmt::Debug+?Sized> {
-   |                 ---------------------- the expected opaque type
-...
 LL |     b_raw = f_raw as *mut _;
-   |             ^^^^^ expected opaque type, found a different opaque type
+   |             ^^^^^^^^^^^^^^^
    |
-   = note: expected opaque type `impl Debug + ?Sized` (opaque type at <$DIR/casts-differing-anon.rs:7:17>)
-              found opaque type `impl Debug + ?Sized` (opaque type at <$DIR/casts-differing-anon.rs:3:17>)
-   = note: distinct uses of `impl Trait` result in different opaque types
+   = note: vtable kinds may not match
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0606`.