Skip to content

Commit 0ab9043

Browse files
8Keepmeta-codesync[bot]
authored andcommitted
Fix OSS rustdoc warnings breaking the Linux CI job
Summary: The OSS `facebook/buck2` `linux-build-and-test` CI job has been red because `test.py`'s rustdoc stage runs `cargo doc --message-format=json --no-deps` and exits 1 on any documentation warning. Six warnings had accumulated. This fixes all four sites: - `app/buck2_client_ctx/src/subscribers/superconsole.rs`: `rustdoc::invalid_html_tags` fired twice, reporting unclosed HTML tags "trace" and "argv", because the doc comment wrote the angle-bracketed placeholders as bare angle brackets, which rustdoc parses as HTML. Wrapped the phrase in backticks so it becomes inline code. - `starlark-rust/starlark/src/values/types/enumeration.rs`: `rustdoc::broken_intra_doc_links` fired twice on a link to `EnumType`. No such public item exists — the module exports `pub(crate) use enum_type::AnyEnumType` and `pub use value::EnumValue`, and `enum_type.rs` declares only `pub(crate) struct EnumTypeGen`. Replaced the links with prose. - `starlark-rust/starlark/src/values/alloc_value.rs`: `Heap::alloc_complex` does not exist; the real methods are `alloc_complex_no_freeze` and `alloc_complex_branded`. Pointed the link at `alloc_complex_no_freeze`. - `starlark-rust/starlark/src/eval/runtime/params/spec.rs`: `rustdoc::private_intra_doc_links` fired because public documentation linked to `ParametersSpec::as_value`, which is `pub(crate) fn as_value`. Demoted the link to plain code formatting. Note that `test.py` silently discards any rustdoc warning whose target `src_path` does not contain the substring `/buck2/`, so reproducing this locally requires checking the repo out into a path containing `/buck2/`. Reviewed By: NavidQar Differential Revision: D116114053 fbshipit-source-id: 4c9bda31589aca6fdb046d32889eca1a11a64911
1 parent 7eb1626 commit 0ab9043

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

starlark/src/eval/runtime/params/spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub struct ParametersSpec<V> {
163163
}
164164

165165
/// `Frozen` ignores the brand: the frozen spec keeps its defaults as `FrozenValue`, because
166-
/// [`ParametersSpec::as_value`] reads the frozen and the unfrozen spec through one type, at the
166+
/// `ParametersSpec::as_value` reads the frozen and the unfrozen spec through one type, at the
167167
/// reader's lifetime. Branding the defaults waits for `FrozenValue` to be branded.
168168
impl<'v> FreezeBranded for ParametersSpec<Value<'v>> {
169169
type Frozen<'fv> = ParametersSpec<FrozenValue>;

starlark/src/values/alloc_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::values::type_repr::StarlarkTypeRepr;
3535
/// is implemented for `char` to construct Starlark `str`.
3636
///
3737
/// For types that implement [`crate::values::StarlarkValue`] a typical implementation
38-
/// will probably call either [`Heap::alloc_simple`] or [`Heap::alloc_complex`],
38+
/// will probably call either [`Heap::alloc_simple`] or [`Heap::alloc_complex_no_freeze`],
3939
/// e.g.
4040
///
4141
/// ```

starlark/src/values/types/enumeration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
//! Fixed set enumerations, with runtime checking of validity.
1919
//!
20-
//! Calling `enum()` produces an [`EnumType`]. Calling the [`EnumType`] creates an [`EnumValue`].
20+
//! Calling `enum()` produces an enum type. Calling that enum type creates an [`EnumValue`].
2121
//!
2222
//! The implementation ensures that each value of the enumeration is only stored once,
2323
//! so they may also provide (modest) memory savings. Created in starlark with the

0 commit comments

Comments
 (0)