mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Merge pull request #529 from marcusklaas/pattern-indent
Fix indentation for enum-style patterns
This commit is contained in:
commit
0c1360a77c
@ -63,8 +63,9 @@ impl Rewrite for Pat {
|
||||
if pat_vec.is_empty() {
|
||||
Some(path_str)
|
||||
} else {
|
||||
let width = try_opt!(width.checked_sub(path_str.len()));
|
||||
let offset = offset + path_str.len();
|
||||
// 1 = (
|
||||
let width = try_opt!(width.checked_sub(path_str.len() + 1));
|
||||
let offset = offset + path_str.len() + 1;
|
||||
let items = itemize_list(context.codemap,
|
||||
pat_vec.iter(),
|
||||
")",
|
||||
|
@ -12,3 +12,14 @@ fn main() {
|
||||
|
||||
if let None = opt2 { panic!("oh noes"); }
|
||||
}
|
||||
|
||||
impl<'a,'b> ResolveGeneratedContentFragmentMutator<'a,'b> {
|
||||
fn mutate_fragment(&mut self, fragment: &mut Fragment) {
|
||||
match **info {
|
||||
GeneratedContentInfo::ContentItem(
|
||||
ContentItem::Counter(
|
||||
ref counter_name,
|
||||
counter_style
|
||||
)
|
||||
) => {}}}
|
||||
}
|
||||
|
@ -14,3 +14,12 @@ fn main() {
|
||||
panic!("oh noes");
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a,'b> ResolveGeneratedContentFragmentMutator<'a,'b> {
|
||||
fn mutate_fragment(&mut self, fragment: &mut Fragment) {
|
||||
match **info {
|
||||
GeneratedContentInfo::ContentItem(ContentItem::Counter(ref counter_name,
|
||||
counter_style)) => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user