]> git.lizzy.rs Git - rust.git/blob - src/test/ui/diverging-tuple-parts-39485.stderr
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
[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 unit type `()`
8               found reference `&_`
9 help: try adding a return type
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 tuple
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`.