mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
hacky solution that makes the tests pass but should really be better
This commit is contained in:
parent
4528a570b8
commit
f5c46559d6
@ -1203,7 +1203,9 @@ pub fn format_struct_struct(
|
||||
one_line_budget,
|
||||
)?;
|
||||
|
||||
if !items_str.contains('\n') && !result.contains('\n') && items_str.len() <= one_line_budget {
|
||||
if !items_str.contains('\n') && !result.contains('\n') && items_str.len() <= one_line_budget
|
||||
&& !items_str.contains("//")
|
||||
{
|
||||
Some(format!("{} {} }}", result, items_str))
|
||||
} else {
|
||||
Some(format!(
|
||||
|
@ -1,5 +1,5 @@
|
||||
enum Issue2446 {
|
||||
V {
|
||||
f: u8, //
|
||||
f: u8, // x
|
||||
},
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
enum Issue2446 {
|
||||
V {
|
||||
f: u8, //
|
||||
f: u8, // x
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user