File tree 3 files changed +6
-9
lines changed
3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -3017,9 +3017,10 @@ impl<'a> LoweringContext<'a> {
3017
3017
let tail = block. expr . take ( ) . map_or_else (
3018
3018
|| {
3019
3019
let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
3020
+ let span = this. sess . codemap ( ) . end_point ( unstable_span) ;
3020
3021
hir:: Expr {
3021
3022
id : node_id,
3022
- span : unstable_span ,
3023
+ span,
3023
3024
node : hir:: ExprTup ( hir_vec ! [ ] ) ,
3024
3025
attrs : ThinVec :: new ( ) ,
3025
3026
hir_id,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ fn main() {
20
20
} ;
21
21
22
22
let _: Option < i32 > = do catch {
23
- //~^ ERROR type mismatch
24
23
foo( ) ?;
25
24
} ;
25
+ //~^ ERROR type mismatch
26
26
}
Original file line number Diff line number Diff line change @@ -8,14 +8,10 @@ LL | 42
8
8
found type `{integer}`
9
9
10
10
error[E0271]: type mismatch resolving `<std::option::Option<i32> as std::ops::Try>::Ok == ()`
11
- --> $DIR/catch-block-type-error.rs:22:35
11
+ --> $DIR/catch-block-type-error.rs:24:5
12
12
|
13
- LL | let _: Option<i32> = do catch {
14
- | ___________________________________^
15
- LL | | //~^ ERROR type mismatch
16
- LL | | foo()?;
17
- LL | | };
18
- | |_____^ expected i32, found ()
13
+ LL | };
14
+ | ^ expected i32, found ()
19
15
|
20
16
= note: expected type `i32`
21
17
found type `()`
You can’t perform that action at this time.
0 commit comments