mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Fix bug in path formatting
This commit is contained in:
parent
43ad7ad7a0
commit
150c333e6c
@ -240,7 +240,7 @@ fn rewrite_segment(segment: &ast::PathSegment,
|
||||
None => String::new(),
|
||||
};
|
||||
|
||||
let list_lo = span_after(codemap::mk_sp(*span_lo, span_hi), "(", context.codemap);
|
||||
let list_lo = span_after(data.span, "(", context.codemap);
|
||||
let items = itemize_list(context.codemap,
|
||||
data.inputs.iter(),
|
||||
")",
|
||||
@ -265,7 +265,7 @@ fn rewrite_segment(segment: &ast::PathSegment,
|
||||
};
|
||||
|
||||
// update pos
|
||||
*span_lo = data.inputs.last().unwrap().span.hi + BytePos(1);
|
||||
*span_lo = data.span.hi + BytePos(1);
|
||||
|
||||
format!("({}){}", write_list(&items.collect::<Vec<_>>(), &fmt), output)
|
||||
}
|
||||
|
@ -68,3 +68,9 @@ struct Tuple(
|
||||
A, //Comment
|
||||
B
|
||||
);
|
||||
|
||||
pub struct State<F: FnMut() -> time::Timespec> { now: F }
|
||||
|
||||
pub struct State<F: FnMut() -> ()> { now: F }
|
||||
|
||||
pub struct State<F: FnMut()> { now: F }
|
||||
|
@ -65,3 +65,15 @@ struct Baz {
|
||||
|
||||
// Will this be a one-liner?
|
||||
struct Tuple(A /* Comment */, B);
|
||||
|
||||
pub struct State<F: FnMut() -> time::Timespec> {
|
||||
now: F,
|
||||
}
|
||||
|
||||
pub struct State<F: FnMut() -> ()> {
|
||||
now: F,
|
||||
}
|
||||
|
||||
pub struct State<F: FnMut()> {
|
||||
now: F,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user