fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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