Merge pull request #3540 from rchaser53/issue-3539

correct to get wrong BytePos
This commit is contained in:
Stéphane Campinas 2019-05-06 22:31:38 +02:00 committed by GitHub
commit da1e3c9635
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -320,7 +320,7 @@ where
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)
};
}