mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Adjust span of closure param
This commit is contained in:
parent
262644d94a
commit
237cbe91a8
@ -2268,7 +2268,7 @@ impl<'a> Parser<'a> {
|
||||
attrs: attrs.into(),
|
||||
ty,
|
||||
pat,
|
||||
span: lo.to(this.token.span),
|
||||
span: lo.to(this.prev_token.span),
|
||||
id: DUMMY_NODE_ID,
|
||||
is_placeholder: false,
|
||||
},
|
||||
|
@ -10,7 +10,7 @@ note: closure parameter defined here
|
||||
--> $DIR/unboxed-closures-type-mismatch.rs:4:18
|
||||
|
|
||||
LL | let mut f = |x: isize, y: isize| -> isize { x + y };
|
||||
| ^^^^^^^^^
|
||||
| ^^^^^^^^
|
||||
help: change the type of the numeric literal from `usize` to `isize`
|
||||
|
|
||||
LL | let z = f(1_isize, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user