correct to get wrong BytePos

This commit is contained in:
rchaser53 2019-05-06 00:01:13 +09:00
parent 8c94e2b104
commit 7a93a26aad
2 changed files with 9 additions and 1 deletions

View File

@ -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))?

View 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)
};
}