Skip to content

Commit 6ef8d93

Browse files
committed
rustdoc cleanup: use rustdoc attribute
1 parent 65418c7 commit 6ef8d93

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

.github/workflows/rust.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
cargo xtask clippy --warnings-as-errors
118118
119119
- name: Run cargo doc
120-
run: cargo xtask doc --warnings-as-errors
120+
run: cargo xtask doc
121121

122122
miri:
123123
name: Run unit tests and doctests under Miri

src/data_types/strs.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,10 @@ impl PartialEq<CString16> for &CStr16 {
347347
/// [`CStr16`] can't be directly constructed. `UnalignedCStr16` instead
348348
/// takes a pointer to the unaligned field, which is allowed. The
349349
/// resulting unaligned string cannot be used directly, but must be
350-
/// converted to an aligned form first with [`to_cstr16`] or
351-
/// [`to_cstring16`].
350+
/// converted to an aligned form first with [`to_cstr16`].
352351
///
353352
/// [`repr(packed)`]: https://doc.rust-lang.org/nomicon/other-reprs.html#reprpacked
354353
/// [`to_cstr16`]: Self::to_cstr16
355-
/// [`to_cstring16`]: Self::to_cstring16
356354
#[derive(Debug)]
357355
pub struct UnalignedCStr16<'a> {
358356
data: *const u16,

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
// Enable some additional warnings and lints.
3434
#![warn(clippy::ptr_as_ptr, missing_docs, unused)]
3535
#![deny(clippy::all)]
36+
#![deny(rustdoc::all)]
37+
#![allow(rustdoc::missing_doc_code_examples)]
3638

3739
// `uefi-exts` requires access to memory allocation APIs.
3840
#[cfg(feature = "exts")]

uefi-macros/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#![recursion_limit = "128"]
2+
#![deny(rustdoc::all)]
3+
#![allow(rustdoc::missing_doc_code_examples)]
4+
5+
//! Code generation macros for the `uefi` crate.
26
37
extern crate proc_macro;
48

uefi-services/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#![no_std]
2020
#![feature(alloc_error_handler)]
2121
#![feature(abi_efiapi)]
22+
#![deny(rustdoc::all)]
23+
#![allow(rustdoc::missing_doc_code_examples)]
2224

2325
#[macro_use]
2426
extern crate log;

xtask/src/cargo.rs

-3
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ impl Cargo {
146146
}
147147
CargoAction::Doc { open } => {
148148
action = "doc";
149-
if self.warnings_as_errors {
150-
cmd.env("RUSTDOCFLAGS", "-Dwarnings");
151-
}
152149
if open {
153150
extra_args.push("--open");
154151
}

0 commit comments

Comments
 (0)