We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 262644d commit 237cbe9Copy full SHA for 237cbe9
compiler/rustc_parse/src/parser/expr.rs
@@ -2268,7 +2268,7 @@ impl<'a> Parser<'a> {
2268
attrs: attrs.into(),
2269
ty,
2270
pat,
2271
- span: lo.to(this.token.span),
+ span: lo.to(this.prev_token.span),
2272
id: DUMMY_NODE_ID,
2273
is_placeholder: false,
2274
},
src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr
@@ -10,7 +10,7 @@ note: closure parameter defined here
10
--> $DIR/unboxed-closures-type-mismatch.rs:4:18
11
|
12
LL | let mut f = |x: isize, y: isize| -> isize { x + y };
13
- | ^^^^^^^^^
+ | ^^^^^^^^
14
help: change the type of the numeric literal from `usize` to `isize`
15
16
LL | let z = f(1_isize, 2);
0 commit comments