]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/mismatched_types/issue-38371.stderr
check_pat_ref: use pattern_cause
[rust.git] / src / test / ui / mismatched_types / issue-38371.stderr
index 79a0807c3372155efc11f5c55d3bb2862c4d1442..c2bce305877b4048f3ead8d07f7fcb217917cb4c 100644 (file)
@@ -3,33 +3,36 @@ error[E0308]: mismatched types
    |
 LL | fn foo(&foo: Foo) {
    |        ^^^^------
-   |        |
+   |        |     |
+   |        |     expected due to this
    |        expected struct `Foo`, found reference
    |        help: did you mean `foo`: `&Foo`
    |
-   = note: expected type `Foo`
-              found type `&_`
+   = note: expected struct `Foo`
+           found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/issue-38371.rs:18:9
    |
 LL | fn agh(&&bar: &u32) {
-   |         ^^^^
+   |         ^^^^  ---- expected due to this
    |         |
-   |         expected u32, found reference
+   |         expected `u32`, found reference
    |         help: you can probably remove the explicit borrow: `bar`
    |
-   = note: expected type `u32`
-              found type `&_`
+   = note:   expected type `u32`
+           found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/issue-38371.rs:21:8
    |
 LL | fn bgh(&&bar: u32) {
-   |        ^^^^^ expected u32, found reference
+   |        ^^^^^  --- expected due to this
+   |        |
+   |        expected `u32`, found reference
    |
-   = note: expected type `u32`
-              found type `&_`
+   = note:   expected type `u32`
+           found reference `&_`
 
 error[E0529]: expected an array or slice, found `u32`
   --> $DIR/issue-38371.rs:24:9