Rollup merge of #112906 - fmease:rustdoc-render-assoc-ty-body-before-where-clause, r=notriddle
rustdoc: render the body of associated types before the where-clause Fixes #112903.
This commit is contained in:
commit
3ba66df643
2 changed files with 4 additions and 3 deletions
|
@ -799,10 +799,11 @@ fn assoc_type(
|
|||
if !bounds.is_empty() {
|
||||
write!(w, ": {}", print_generic_bounds(bounds, cx))
|
||||
}
|
||||
write!(w, "{}", print_where_clause(generics, cx, indent, Ending::NoNewline));
|
||||
// Render the default before the where-clause which aligns with the new recommended style. See #89122.
|
||||
if let Some(default) = default {
|
||||
write!(w, " = {}", default.print(cx))
|
||||
}
|
||||
write!(w, "{}", print_where_clause(generics, cx, indent, Ending::NoNewline));
|
||||
}
|
||||
|
||||
fn assoc_method(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue