You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new doc_overindented_list_items lint makes sense in many cases. But I think it's too aggressive when it comes to argument lists. These are usually formatted in two columns, and the lint triggers if the text in the right column contains multiple lines. A real-world example from Mockall is:
/// # Arguments////// * `modname`: Name of the parent struct's private module/// * `self_args`: If supplied, these are the/// AngleBracketedGenericArguments of the self type of the/// trait impl. e.g. The `T` in `impl Foo for Bar<T>`.
Should this lint be toned down, or is there a better way to format argument lists? In the Mockall example, the documentation is for internal use only; it isn't even generated on docs.rs. So I don't want to sacrifice readability of the source just to improve the non-existent HTML.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The new
doc_overindented_list_items
lint makes sense in many cases. But I think it's too aggressive when it comes to argument lists. These are usually formatted in two columns, and the lint triggers if the text in the right column contains multiple lines. A real-world example from Mockall is:Another example that I found online is rust-lang/rust#57525 .
Should this lint be toned down, or is there a better way to format argument lists? In the Mockall example, the documentation is for internal use only; it isn't even generated on docs.rs. So I don't want to sacrifice readability of the source just to improve the non-existent HTML.
Beta Was this translation helpful? Give feedback.
All reactions