]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/trivial_casts.stderr
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.git] / src / test / ui / trivial_casts.stderr
index 524eb7feaafbdfd37e6df9fa12bf036ab8d51146..8fa44372f0b4f8e858532db82f394d401edf9dc8 100644 (file)
@@ -83,56 +83,56 @@ LL |     let _ = x as Box<[u32]>;
 error: trivial cast: `&Bar` as `&dyn Foo`
   --> $DIR/trivial_casts.rs:52:13
    |
-LL |     let _ = x as &Foo;
-   |             ^^^^^^^^^
+LL |     let _ = x as &dyn Foo;
+   |             ^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&Bar` as `*const dyn Foo`
   --> $DIR/trivial_casts.rs:53:13
    |
-LL |     let _ = x as *const Foo;
-   |             ^^^^^^^^^^^^^^^
+LL |     let _ = x as *const dyn Foo;
+   |             ^^^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&mut Bar` as `&mut dyn Foo`
   --> $DIR/trivial_casts.rs:58:13
    |
-LL |     let _ = x as &mut Foo;
-   |             ^^^^^^^^^^^^^
+LL |     let _ = x as &mut dyn Foo;
+   |             ^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&mut Bar` as `*mut dyn Foo`
   --> $DIR/trivial_casts.rs:59:13
    |
-LL |     let _ = x as *mut Foo;
-   |             ^^^^^^^^^^^^^
+LL |     let _ = x as *mut dyn Foo;
+   |             ^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `std::boxed::Box<Bar>` as `std::boxed::Box<dyn Foo>`
   --> $DIR/trivial_casts.rs:64:13
    |
-LL |     let _ = x as Box<Foo>;
-   |             ^^^^^^^^^^^^^
+LL |     let _ = x as Box<dyn Foo>;
+   |             ^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)`
   --> $DIR/trivial_casts.rs:70:13
    |
-LL |     let _ = &baz as &Fn(i32);
-   |             ^^^^^^^^^^^^^^^^
+LL |     let _ = &baz as &dyn Fn(i32);
+   |             ^^^^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable
 
 error: trivial cast: `&[closure@$DIR/trivial_casts.rs:72:13: 72:25]` as `&dyn std::ops::Fn(i32)`
   --> $DIR/trivial_casts.rs:73:13
    |
-LL |     let _ = &x as &Fn(i32);
-   |             ^^^^^^^^^^^^^^
+LL |     let _ = &x as &dyn Fn(i32);
+   |             ^^^^^^^^^^^^^^^^^^
    |
    = help: cast can be replaced by coercion; this might require a temporary variable