parent
4b01e62943
commit
a57d57b16a
@ -2996,10 +2996,12 @@ fn rewrite_bounds_on_where_clause(
|
||||
DefinitiveListTactic::Vertical
|
||||
};
|
||||
|
||||
let preserve_newline = context.config.version() == Version::One;
|
||||
|
||||
let fmt = ListFormatting::new(shape, context.config)
|
||||
.tactic(shape_tactic)
|
||||
.trailing_separator(comma_tactic)
|
||||
.preserve_newline(true);
|
||||
.preserve_newline(preserve_newline);
|
||||
write_list(&items.collect::<Vec<_>>(), &fmt)
|
||||
}
|
||||
|
||||
|
9
tests/source/issue-5655/one.rs
Normal file
9
tests/source/issue-5655/one.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// rustfmt-version: One
|
||||
|
||||
fn foo<T>(_: T)
|
||||
where
|
||||
T: std::fmt::Debug,
|
||||
|
||||
T: std::fmt::Display,
|
||||
{
|
||||
}
|
9
tests/source/issue-5655/two.rs
Normal file
9
tests/source/issue-5655/two.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// rustfmt-version: Two
|
||||
|
||||
fn foo<T>(_: T)
|
||||
where
|
||||
T: std::fmt::Debug,
|
||||
|
||||
T: std::fmt::Display,
|
||||
{
|
||||
}
|
9
tests/target/issue-5655/one.rs
Normal file
9
tests/target/issue-5655/one.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// rustfmt-version: One
|
||||
|
||||
fn foo<T>(_: T)
|
||||
where
|
||||
T: std::fmt::Debug,
|
||||
|
||||
T: std::fmt::Display,
|
||||
{
|
||||
}
|
8
tests/target/issue-5655/two.rs
Normal file
8
tests/target/issue-5655/two.rs
Normal file
@ -0,0 +1,8 @@
|
||||
// rustfmt-version: Two
|
||||
|
||||
fn foo<T>(_: T)
|
||||
where
|
||||
T: std::fmt::Debug,
|
||||
T: std::fmt::Display,
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user