summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/issue-50687-ice-on-borrow.stderr
blob: 9e48ccefd86b95e5987c18efb743c44e1a394f85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error[E0308]: mismatched types
  --> $DIR/issue-50687-ice-on-borrow.rs:40:17
   |
LL |     let _: () = Borrow::borrow(&owned);
   |            --   ^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `&_`
   |            |
   |            expected due to this
   |
   = note: expected unit type `()`
              found reference `&_`
help: consider dereferencing the borrow
   |
LL |     let _: () = *Borrow::borrow(&owned);
   |                 +

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.