]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/destructure-trait-ref.stderr
check_pat_ref: use pattern_cause
[rust.git] / src / test / ui / destructure-trait-ref.stderr
index c78166f411d2855d8c3fb287720631bc7b7fe71c..1382cf643a17331cd7c18d2a7f8f619da16b3a2c 100644 (file)
@@ -20,33 +20,33 @@ error[E0308]: mismatched types
   --> $DIR/destructure-trait-ref.rs:32:10
    |
 LL |     let &&x = &1isize as &dyn T;
-   |          ^^
+   |          ^^   ----------------- this expression has type `&dyn T`
    |          |
-   |          expected trait `T`, found reference
+   |          expected trait object `dyn T`, found reference
    |          help: you can probably remove the explicit borrow: `x`
    |
    = note: expected trait object `dyn T`
                  found reference `&_`
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:37:11
+  --> $DIR/destructure-trait-ref.rs:36:11
    |
 LL |     let &&&x = &(&1isize as &dyn T);
-   |           ^^
+   |           ^^   -------------------- this expression has type `&&dyn T`
    |           |
-   |           expected trait `T`, found reference
+   |           expected trait object `dyn T`, found reference
    |           help: you can probably remove the explicit borrow: `x`
    |
    = note: expected trait object `dyn T`
                  found reference `&_`
 
 error[E0308]: mismatched types
-  --> $DIR/destructure-trait-ref.rs:42:13
+  --> $DIR/destructure-trait-ref.rs:40:13
    |
 LL |     let box box x = box 1isize as Box<dyn T>;
    |             ^^^^^   ------------------------ this expression has type `std::boxed::Box<dyn T>`
    |             |
-   |             expected trait `T`, found struct `std::boxed::Box`
+   |             expected trait object `dyn T`, found struct `std::boxed::Box`
    |
    = note: expected trait object `dyn T`
                     found struct `std::boxed::Box<_>`