Skip to content

Commit

Permalink
Rollup merge of rust-lang#102216 - ehuss:rustdoc-diagnostic-width, r=…
Browse files Browse the repository at this point in the history
…notriddle

rustdoc: Stabilize --diagnostic-width

This stabilizes the `--diagnostic-width` flag for rustdoc. This flag was stabilized in rustc in rust-lang#95635, but it isn't clear from the discussion there why it wasn't stabilized in rustdoc. I believe this flag works as expected, following the same behavior as rustc.

I'd like to stabilize this so that the same support can be stabilized in cargo, and it would help simplify things if both rustc and rustdoc supported it.
  • Loading branch information
matthiaskrgr committed Sep 25, 2022
2 parents 11b4510 + 3d01d43 commit 094f09e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ fn opts() -> Vec<RustcOptGroup> {
"human|json|short",
)
}),
unstable("diagnostic-width", |o| {
stable("diagnostic-width", |o| {
o.optopt(
"",
"diagnostic-width",
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc-ui/diagnostic-width.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compile-flags: -Zunstable-options --diagnostic-width=10
// compile-flags: --diagnostic-width=10
#![deny(rustdoc::bare_urls)]

/// This is a long line that contains a http://link.com
Expand Down

0 comments on commit 094f09e

Please sign in to comment.