correct to get wrong BytePos
This commit is contained in:
parent
8c94e2b104
commit
7a93a26aad
@ -320,7 +320,7 @@ fn format_function_type<'a, I>(
|
||||
let list_lo = context.snippet_provider.span_after(span, "(");
|
||||
let (list_str, tactic) = if inputs.len() == 0 {
|
||||
let tactic = get_tactics(&[], &output, shape);
|
||||
let list_hi = context.snippet_provider.span_before_last(span, ")");
|
||||
let list_hi = context.snippet_provider.span_before(span, ")");
|
||||
let comment = context
|
||||
.snippet_provider
|
||||
.span_to_snippet(mk_sp(list_lo, list_hi))?
|
||||
|
8
tests/target/issue-3539.rs
Normal file
8
tests/target/issue-3539.rs
Normal file
@ -0,0 +1,8 @@
|
||||
use std::io::Error;
|
||||
|
||||
fn main() {
|
||||
let _read_num: fn() -> Result<(i32), Error> = || -> Result<(i32), Error> {
|
||||
let a = 1;
|
||||
Ok(a)
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user