]> git.lizzy.rs Git - rust.git/blob - src/test/ui/diverging-tuple-parts-39485.stderr
Auto merge of #60132 - davidtwco:issue-60075, r=estebank
[rust.git] / src / test / ui / diverging-tuple-parts-39485.stderr
1 error[E0308]: mismatched types
2   --> $DIR/diverging-tuple-parts-39485.rs:8:5
3    |
4 LL |     &panic!()
5    |     ^^^^^^^^^ expected (), found reference
6    |
7    = note: expected type `()`
8               found type `&_`
9 help: try adding a return type
10    |
11 LL | fn g() -> &_ {
12    |        ^^^^^
13 help: consider removing the borrow
14    |
15 LL |     panic!()
16    |     ^^^^^^^^
17
18 error[E0308]: mismatched types
19   --> $DIR/diverging-tuple-parts-39485.rs:12:5
20    |
21 LL | fn f() -> isize {
22    |           ----- expected `isize` because of return type
23 LL |     (return 1, return 2)
24    |     ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple
25    |
26    = note: expected type `isize`
27               found type `(!, !)`
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0308`.