mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 12:44:40 +00:00
Merge pull request #198 from marcusklaas/parameterized-paths-matter
Fix bug in path formatting
This commit is contained in:
commit
8319e33573
@ -231,7 +231,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(),
|
||||
")",
|
||||
@ -248,7 +248,7 @@ fn rewrite_segment(segment: &ast::PathSegment,
|
||||
let fmt = ListFormatting::for_fn(budget, offset + 1);
|
||||
|
||||
// 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