File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Expand file tree Collapse file tree 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> {
30173017 let tail = block. expr . take ( ) . map_or_else (
30183018 || {
30193019 let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
3020+ let span = this. sess . codemap ( ) . end_point ( unstable_span) ;
30203021 hir:: Expr {
30213022 id : node_id,
3022- span : unstable_span ,
3023+ span,
30233024 node : hir:: ExprTup ( hir_vec ! [ ] ) ,
30243025 attrs : ThinVec :: new ( ) ,
30253026 hir_id,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ fn main() {
2020 } ;
2121
2222 let _: Option < i32 > = do catch {
23- //~^ ERROR type mismatch
2423 foo( ) ?;
2524 } ;
25+ //~^ ERROR type mismatch
2626}
Original file line number Diff line number Diff line change @@ -8,14 +8,10 @@ LL | 42
88 found type `{integer}`
99
1010error[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
1212 |
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 ()
1915 |
2016 = note: expected type `i32`
2117 found type `()`
You can’t perform that action at this time.
0 commit comments