Skip to content

Commit ed8590e

Browse files
committed
Auto merge of #9903 - jyn514:rustdoc-warnings, r=alexcrichton
Fix warnings when documenting with `--document-private-items` - Use hyperlinks for URLs - Fix broken intra-doc links This doesn't fix the following warning, since I wasn't sure what change was appropriate: ``` warning: public documentation for `rustc_process` links to private item `self::core::compiler::Context::primary_packages` --> src/cargo/core/compiler/compilation.rs:164:22 | 164 | /// flag), see [`crate::core::compiler::Context::primary_packages`]. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this item is private | = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default = note: this link resolves only because you passed `--document-private-items`, but will break without ``` To avoid noise, this doesn't add an `allow` either.
2 parents f7ca659 + bf62ae9 commit ed8590e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/cargo/core/manifest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,15 @@ struct SerializedTarget<'a> {
259259
/// Serialized as a list of strings for historical reasons.
260260
kind: &'a TargetKind,
261261
/// Corresponds to `--crate-type` compiler attribute.
262-
/// See https://doc.rust-lang.org/reference/linkage.html
262+
/// See <https://doc.rust-lang.org/reference/linkage.html>
263263
crate_types: Vec<CrateType>,
264264
name: &'a str,
265265
src_path: Option<&'a PathBuf>,
266266
edition: &'a str,
267267
#[serde(rename = "required-features", skip_serializing_if = "Option::is_none")]
268268
required_features: Option<Vec<&'a str>>,
269269
/// Whether docs should be built for the target via `cargo doc`
270-
/// See https://doc.rust-lang.org/cargo/commands/cargo-doc.html#target-selection
270+
/// See <https://doc.rust-lang.org/cargo/commands/cargo-doc.html#target-selection>
271271
doc: bool,
272272
doctest: bool,
273273
/// Whether tests should be run for the target (`test` field in `Cargo.toml`)

src/cargo/core/resolver/version_prefs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use crate::util::interning::InternedString;
99

1010
/// A collection of preferences for particular package versions.
1111
///
12-
/// This is built up with [`prefer_package_id`] and [`prefer_dep`], then used to sort the set of
13-
/// summaries for a package during resolution via [`sort_summaries`].
12+
/// This is built up with [`Self::prefer_package_id`] and [`Self::prefer_dependency`], then used to sort the set of
13+
/// summaries for a package during resolution via [`Self::sort_summaries`].
1414
///
1515
/// As written, a version is either "preferred" or "not preferred". Later extensions may
1616
/// introduce more granular preferences.

src/cargo/util/rustc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ impl Rustc {
135135
/// for no-op builds, we cache it here, based on compiler's mtime and rustup's
136136
/// current toolchain.
137137
///
138-
/// https://github.com/rust-lang/cargo/issues/5315
139-
/// https://github.com/rust-lang/rust/issues/49761
138+
/// <https://github.com/rust-lang/cargo/issues/5315>
139+
/// <https://github.com/rust-lang/rust/issues/49761>
140140
#[derive(Debug)]
141141
struct Cache {
142142
cache_location: Option<PathBuf>,

0 commit comments

Comments
 (0)