]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/diverging-tuple-parts-39485.stderr
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / ui / never_type / 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 `&_`
6    |
7    = note: expected unit type `()`
8               found reference `&_`
9 help: a return type might be missing here
10    |
11 LL | fn g() -> _ {
12    |        ++++
13 help: consider removing the borrow
14    |
15 LL -     &panic!()
16 LL +     panic!()
17    |
18
19 error[E0308]: mismatched types
20   --> $DIR/diverging-tuple-parts-39485.rs:12:5
21    |
22 LL | fn f() -> isize {
23    |           ----- expected `isize` because of return type
24 LL |     (return 1, return 2)
25    |     ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `(!, !)`
26    |
27    = note: expected type `isize`
28              found tuple `(!, !)`
29
30 error: aborting due to 2 previous errors
31
32 For more information about this error, try `rustc --explain E0308`.