From a17171af483b4fd17f75e18bccfdb44b8a1feb48 Mon Sep 17 00:00:00 2001 From: aiongg Date: Sat, 14 Nov 2026 00:15:29 +0000 Subject: [PATCH] Lints: drop the workspace missing_docs lint and warn on it in the framework crates that document every public item --- Cargo.toml | 3 --- crates/aaf/src/lib.rs | 1 + crates/ai-core/src/lib.rs | 2 +- crates/atomic/src/lib.rs | 1 + crates/automation/src/lib.rs | 1 + crates/behavior/src/lib.rs | 1 + crates/browse/src/lib.rs | 1 + crates/color/src/lib.rs | 1 + crates/craft/src/lib.rs | 1 + crates/crw/src/lib.rs | 1 + crates/design-lint/src/lib.rs | 1 + crates/dialogs/src/lib.rs | 1 + crates/doc/src/lib.rs | 1 + crates/docpath/src/lib.rs | 1 + crates/draw/src/lib.rs | 1 + crates/dxf/src/lib.rs | 1 + crates/ecproj-format/src/lib.rs | 1 + crates/font-manager/src/lib.rs | 1 + crates/font-subset/src/lib.rs | 1 + crates/fonts-build/src/lib.rs | 1 + crates/host/src/lib.rs | 1 + crates/imaging/src/lib.rs | 1 + crates/jpeg/src/lib.rs | 1 + crates/keymap/src/lib.rs | 1 + crates/layers/src/lib.rs | 1 + crates/media/src/lib.rs | 1 + crates/menu/src/lib.rs | 1 + crates/pages/src/lib.rs | 1 + crates/pcraft-format/src/lib.rs | 1 + crates/plate-test/src/lib.rs | 1 + crates/platform/src/lib.rs | 1 + crates/prepress/src/lib.rs | 1 + crates/print/src/lib.rs | 2 +- crates/proof/src/lib.rs | 1 + crates/quit/src/lib.rs | 1 + crates/review/src/lib.rs | 1 + crates/settings/src/lib.rs | 1 + crates/table/src/lib.rs | 1 + crates/text/src/lib.rs | 1 + crates/theme-store/src/lib.rs | 1 + crates/theme/src/lib.rs | 1 + crates/ui-bench/src/lib.rs | 1 + crates/ui-canvas/src/lib.rs | 1 + crates/ui-contract/src/lib.rs | 1 + crates/ui-gallery/src/lib.rs | 1 + crates/ui-macros/src/lib.rs | 1 + crates/ui-panels/src/lib.rs | 1 + crates/ui-patterns/src/lib.rs | 1 + crates/ui-shell/src/lib.rs | 1 + crates/ui-test-kit/src/lib.rs | 1 + crates/ui-widgets/src/lib.rs | 1 + crates/ui/src/lib.rs | 1 + crates/update/src/lib.rs | 2 +- crates/vectorcraft-format/src/lib.rs | 1 + crates/web-api/src/lib.rs | 1 + crates/win32/src/lib.rs | 1 + crates/window/src/lib.rs | 1 + 57 files changed, 56 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b4b25e5c9..77502bb4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -199,9 +199,6 @@ chrono = { version = "0.4.45", default-features = false, features = ["std"] } [workspace.lints.rust] unsafe_code = "forbid" -# Every public item has a doc comment; a self-evident field or variant carries -# `#[allow(missing_docs)]` instead. -missing_docs = "warn" unused_workspace_dependencies = "allow" unexpected_cfgs = { level = "warn", check-cfg = ["cfg(craft_pdf_unicode_fixtures)"] } diff --git a/crates/aaf/src/lib.rs b/crates/aaf/src/lib.rs index 235eff2d6..81207a8c3 100644 --- a/crates/aaf/src/lib.rs +++ b/crates/aaf/src/lib.rs @@ -19,6 +19,7 @@ //! //! Input is untrusted: a damaged or crafted file gives an [`Error`] or a [`Report`] entry, never //! a panic, a hang or an allocation sized by a count in the file. +#![warn(missing_docs)] pub mod aaf; pub mod model; diff --git a/crates/ai-core/src/lib.rs b/crates/ai-core/src/lib.rs index d3316cdc1..5f381d3ce 100644 --- a/crates/ai-core/src/lib.rs +++ b/crates/ai-core/src/lib.rs @@ -28,7 +28,7 @@ //! | [`spec`] | a provider described as data: types, checker and substitutions (task u2) | //! | [`provider`] | the [`Provider`] trait | //! | [`mock`], [`conformance`] | scripted provider and reusable behaviour checks | - +#![warn(missing_docs)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] pub mod capability; diff --git a/crates/atomic/src/lib.rs b/crates/atomic/src/lib.rs index 1e89298bb..bb418fff5 100644 --- a/crates/atomic/src/lib.rs +++ b/crates/atomic/src/lib.rs @@ -45,6 +45,7 @@ //! - **Web / WASM**: On `wasm32`, returns standard unsupported `io::Error` rather than panicking. //! - **Failure Injection**: [`atomic_write_custom`] accepts an [`AtomicFs`] implementation so //! callers and test suites can inject disk-full, lock-contention, or permission errors at each stage. +#![warn(missing_docs)] use std::fs::{File, OpenOptions}; use std::io::{self, Write}; diff --git a/crates/automation/src/lib.rs b/crates/automation/src/lib.rs index e89f9833e..9d1f8fea9 100644 --- a/crates/automation/src/lib.rs +++ b/crates/automation/src/lib.rs @@ -14,6 +14,7 @@ //! //! The crate never names a document: what `engine.execute`, `ui.inspect` or `ui.set` mean is the //! app's, through its method table. Everything a method table does not want to own is here. +#![warn(missing_docs)] pub mod actions; #[cfg(feature = "ui")] diff --git a/crates/behavior/src/lib.rs b/crates/behavior/src/lib.rs index 046127e30..86abd276d 100644 --- a/crates/behavior/src/lib.rs +++ b/crates/behavior/src/lib.rs @@ -3,6 +3,7 @@ //! //! The crate depends on no egui crate: it uses `emath`, `kurbo` (geometry), `serde` (saved data) and the `accesskit` //! data crate only. +#![warn(missing_docs)] pub mod anchor; diff --git a/crates/browse/src/lib.rs b/crates/browse/src/lib.rs index 199804fed..afcce888d 100644 --- a/crates/browse/src/lib.rs +++ b/crates/browse/src/lib.rs @@ -8,6 +8,7 @@ //! //! Every listing, status check, search and decode runs as a job on the host's queue; nothing //! here spawns a thread. +#![warn(missing_docs)] pub mod links; pub mod places; diff --git a/crates/color/src/lib.rs b/crates/color/src/lib.rs index 80172fde7..cba6a84a8 100644 --- a/crates/color/src/lib.rs +++ b/crates/color/src/lib.rs @@ -5,6 +5,7 @@ //! [`CmykModel`], web-safe colours ([`web_safe`], [`not_web_safe`]), swatch files ([`palette`]), the display transform ([`display`]) and colour //! harmonies ([`harmony`]). //! [`AreaMode`] (and `ui::RampKind`) serialize as their [`key`](AreaMode::key); the swatch and harmony settings types serialize too. +#![warn(missing_docs)] mod cmyk; pub mod display; diff --git a/crates/craft/src/lib.rs b/crates/craft/src/lib.rs index 4349ddb78..cf43819b5 100644 --- a/crates/craft/src/lib.rs +++ b/crates/craft/src/lib.rs @@ -1,5 +1,6 @@ //! The craft libraries in one dependency. Turn on one feature per crate and `ui` for their //! egui side; import through `craft::`. +#![warn(missing_docs)] pub mod egui_fork; diff --git a/crates/crw/src/lib.rs b/crates/crw/src/lib.rs index bdd36a380..2fcd8f3a5 100644 --- a/crates/crw/src/lib.rs +++ b/crates/crw/src/lib.rs @@ -29,6 +29,7 @@ //! //! Colour (camera matrices, profiles) is out of scope: the file carries none, and the app owns //! its colour model. +#![warn(missing_docs)] mod tables; #[cfg(test)] diff --git a/crates/design-lint/src/lib.rs b/crates/design-lint/src/lib.rs index f58c7a49c..cfff9b555 100644 --- a/crates/design-lint/src/lib.rs +++ b/crates/design-lint/src/lib.rs @@ -8,6 +8,7 @@ //! The syntax half is [`check`]: it parses the configured directories and reports //! literal sizes, named colour constants, style mutation and crate-wide clippy allows as a [`Report`]. //! A [`Baseline`] records the findings of an existing code base so a check fails only on new ones. +#![warn(missing_docs)] mod baseline; mod clippy; diff --git a/crates/dialogs/src/lib.rs b/crates/dialogs/src/lib.rs index 2bd32e9be..299d5accc 100644 --- a/crates/dialogs/src/lib.rs +++ b/crates/dialogs/src/lib.rs @@ -17,6 +17,7 @@ //! On macOS, Open and Folder show as a free-standing panel that doesn't block the window, as //! native apps do; Save and message boxes show as a sheet on the parent window. Elsewhere every //! dialog is a modal owned by the parent window. +#![warn(missing_docs)] mod filter; mod native; diff --git a/crates/doc/src/lib.rs b/crates/doc/src/lib.rs index 28c378293..f23ae12de 100644 --- a/crates/doc/src/lib.rs +++ b/crates/doc/src/lib.rs @@ -28,6 +28,7 @@ //! assert_eq!(info.version, 4); //! assert!(info.supported); //! ``` +#![warn(missing_docs)] mod budget; mod cancel; diff --git a/crates/docpath/src/lib.rs b/crates/docpath/src/lib.rs index a85847dd9..b8713f91f 100644 --- a/crates/docpath/src/lib.rs +++ b/crates/docpath/src/lib.rs @@ -77,6 +77,7 @@ //! assert_eq!(resolve(r"\\other\share\logo.png", Some(doc)), Err(Refused::Network)); //! assert_eq!(resolve_absolute("img/logo.png", None), Err(Refused::Invalid)); //! ``` +#![warn(missing_docs)] pub mod links; pub mod names; diff --git a/crates/draw/src/lib.rs b/crates/draw/src/lib.rs index f87868bf6..a27622d1f 100644 --- a/crates/draw/src/lib.rs +++ b/crates/draw/src/lib.rs @@ -1,4 +1,5 @@ //! Vector and shape tools: gradient editing, the Pen and path editing, strokes and corners, shapes, slices, artboards and connectors, Crop and Perspective Crop, Free Transform, measure, symmetry and brush presets. +#![warn(missing_docs)] pub mod geometry; pub mod stroke; diff --git a/crates/dxf/src/lib.rs b/crates/dxf/src/lib.rs index c339fa256..5018ed057 100644 --- a/crates/dxf/src/lib.rs +++ b/crates/dxf/src/lib.rs @@ -5,6 +5,7 @@ //! reads the tags as a drawing (header variables, tables, blocks, entities, objects); mapping //! that onto an application's own document is left to the caller. Written from Autodesk's //! published DXF Reference; depends on no other Craft crate. Moved from CADCraft's `cadcraft-dxf`. +#![warn(missing_docs)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] #![forbid(unsafe_code)] diff --git a/crates/ecproj-format/src/lib.rs b/crates/ecproj-format/src/lib.rs index cb4573862..8e99bf460 100644 --- a/crates/ecproj-format/src/lib.rs +++ b/crates/ecproj-format/src/lib.rs @@ -52,6 +52,7 @@ //! //! An `.ecprojx` file holds the same object encoded as XML. This crate reads and writes the JSON //! form only. +#![warn(missing_docs)] use std::borrow::Cow; use std::fmt; diff --git a/crates/font-manager/src/lib.rs b/crates/font-manager/src/lib.rs index 806f74bda..b055eeb76 100644 --- a/crates/font-manager/src/lib.rs +++ b/crates/font-manager/src/lib.rs @@ -12,6 +12,7 @@ //! //! Also on `ui`: [`glyphs::GlyphsPanel`], [`missing::MissingFontsDialog`], [`axes::AxisSliders`] and //! [`picker::FontPicker`], the font family field for text tools and panels. +#![warn(missing_docs)] pub mod filter; pub mod index; diff --git a/crates/font-subset/src/lib.rs b/crates/font-subset/src/lib.rs index 1996f9bf9..efd1c8942 100644 --- a/crates/font-subset/src/lib.rs +++ b/crates/font-subset/src/lib.rs @@ -10,6 +10,7 @@ //! - [`embed_permission`]: what a font's OS/2 `fsType` allows an exported document (PDF) to embed. //! //! Synchronous and free of I/O. +#![warn(missing_docs)] mod cff; pub mod closure; diff --git a/crates/fonts-build/src/lib.rs b/crates/fonts-build/src/lib.rs index 17c1b8b8a..8bf68455c 100644 --- a/crates/fonts-build/src/lib.rs +++ b/crates/fonts-build/src/lib.rs @@ -50,6 +50,7 @@ //! Web builds can serve the faces beside the wasm instead: [`Embed::serve`] copies the selected //! files into a directory and writes a table of [`ServedFace`]s, which carry a URL in place of the //! bytes, for the app to fetch the faces it needs at run time. +#![warn(missing_docs)] mod cmap; pub mod coverage; diff --git a/crates/host/src/lib.rs b/crates/host/src/lib.rs index d1ace6053..f3b5a8d53 100644 --- a/crates/host/src/lib.rs +++ b/crates/host/src/lib.rs @@ -1,4 +1,5 @@ #![doc = include_str!("../README.md")] +#![warn(missing_docs)] mod files; pub mod queue; diff --git a/crates/imaging/src/lib.rs b/crates/imaging/src/lib.rs index a04332f8a..be3fdbb5a 100644 --- a/crates/imaging/src/lib.rs +++ b/crates/imaging/src/lib.rs @@ -1,6 +1,7 @@ //! Raster image editing for Craft apps: warps, adjustments, layer styles, selection tools and masks, the full-window editors, channels and scopes. //! //! [`scopes`], [`selection`], [`trace`] and [`layer_style`] work without egui and build on every target. The widgets are behind the `ui` feature. +#![warn(missing_docs)] pub mod layer_style; pub mod scopes; diff --git a/crates/jpeg/src/lib.rs b/crates/jpeg/src/lib.rs index 715fb6728..350416f20 100644 --- a/crates/jpeg/src/lib.rs +++ b/crates/jpeg/src/lib.rs @@ -45,6 +45,7 @@ //! allocations are checked against the [`Limits`] first. //! Damaged entropy-coded data stops that scan; what was decoded is kept and the caller is told //! through [`Decoded::damaged`]. +#![warn(missing_docs)] /// Why a stream could not be decoded. #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] diff --git a/crates/keymap/src/lib.rs b/crates/keymap/src/lib.rs index 675da1298..c74faf64f 100644 --- a/crates/keymap/src/lib.rs +++ b/crates/keymap/src/lib.rs @@ -131,6 +131,7 @@ //! assert_eq!((report.unmatched[0].item.as_str(), report.unmatched[0].line), ("File > Frobnicate", Some(13))); //! assert_eq!(keymap.bindings(&"file.save".into()), [Binding::parse("Cmd+Alt+S").unwrap()]); //! ``` +#![warn(missing_docs)] pub mod chord; pub mod command; diff --git a/crates/layers/src/lib.rs b/crates/layers/src/lib.rs index 2419cf6f1..1881cc192 100644 --- a/crates/layers/src/lib.rs +++ b/crates/layers/src/lib.rs @@ -3,6 +3,7 @@ //! The app implements `ui::tree::LayerTree`, a read-only view of its layers, and shows it with //! `ui::panel::LayersPanel`, which reports what the user did as events in the order they //! happened. The app applies them with its own commands and undo. +#![warn(missing_docs)] pub mod ui; diff --git a/crates/media/src/lib.rs b/crates/media/src/lib.rs index 61858d8a5..2289c8910 100644 --- a/crates/media/src/lib.rs +++ b/crates/media/src/lib.rs @@ -17,6 +17,7 @@ //! //! `bitstream` and `isobmff` are on by default; `matroska`, `ogg`, `avi`, `mxf` and `mpegts` are opt-in. A crate that needs //! only bit I/O uses `default-features = false, features = ["bitstream"]`. +#![warn(missing_docs)] #[cfg(feature = "avi")] pub mod avi; diff --git a/crates/menu/src/lib.rs b/crates/menu/src/lib.rs index cfb66c2c2..57e962509 100644 --- a/crates/menu/src/lib.rs +++ b/crates/menu/src/lib.rs @@ -82,6 +82,7 @@ //! (or [`NativeMenu::sync`], which compares a layout built every frame). //! The input filter also keeps a click or Escape that closes an open native menu away //! from egui. +#![warn(missing_docs)] pub mod bar; pub mod context; diff --git a/crates/pages/src/lib.rs b/crates/pages/src/lib.rs index 49404add1..b369fa26f 100644 --- a/crates/pages/src/lib.rs +++ b/crates/pages/src/lib.rs @@ -18,6 +18,7 @@ //! tables. //! //! Lengths are PDF points (1/72 inch) throughout; screen lengths are egui points. +#![warn(missing_docs)] pub mod layout; #[cfg(test)] diff --git a/crates/pcraft-format/src/lib.rs b/crates/pcraft-format/src/lib.rs index 7f2ffa0bf..07ea07c3b 100644 --- a/crates/pcraft-format/src/lib.rs +++ b/crates/pcraft-format/src/lib.rs @@ -31,6 +31,7 @@ //! assert_eq!(manifest.document["name"], "Untitled"); //! assert_eq!(manifest.thumbnail, None); //! ``` +#![warn(missing_docs)] mod limits; mod migrate; diff --git a/crates/plate-test/src/lib.rs b/crates/plate-test/src/lib.rs index 12e41c37f..c5a1e757f 100644 --- a/crates/plate-test/src/lib.rs +++ b/crates/plate-test/src/lib.rs @@ -9,6 +9,7 @@ //! On developer machines, [`report`] separates each scene's PDF into plates with Ghostscript //! ([`gs`], an external program; [`tiff`] reads the plates) and [`judge`]s the ink at the //! scene's sample points. +#![warn(missing_docs)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] pub mod gs; diff --git a/crates/platform/src/lib.rs b/crates/platform/src/lib.rs index b42e56def..13f43a444 100644 --- a/crates/platform/src/lib.rs +++ b/crates/platform/src/lib.rs @@ -1,5 +1,6 @@ #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] //! Shared lifecycle mechanics; application state, theme choices and file policy stay in hosts. +#![warn(missing_docs)] #[cfg(feature = "appearance")] pub mod appearance; pub mod autosave; diff --git a/crates/prepress/src/lib.rs b/crates/prepress/src/lib.rs index 145055729..38492ec23 100644 --- a/crates/prepress/src/lib.rs +++ b/crates/prepress/src/lib.rs @@ -3,6 +3,7 @@ //! Prepress for the Craft apps: an ink model and ink manager shared by the writers, //! plates rendered from a PDF, coverage and a color preview read from the plates, and process //! color conversion through craft-cms. See the README. +#![warn(missing_docs)] pub mod cms; pub mod composite; diff --git a/crates/print/src/lib.rs b/crates/print/src/lib.rs index 284740753..1f4a8da4e 100644 --- a/crates/print/src/lib.rs +++ b/crates/print/src/lib.rs @@ -5,7 +5,7 @@ //! with the options as a PrintTicket, all in this process (`windows.rs`): no PowerShell or other //! program is started, so printing works where scripts are locked down. Other platforms report //! that printing isn't available yet; the print-ready PDF can still be saved. - +#![warn(missing_docs)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] #[cfg(any(test, windows))] diff --git a/crates/proof/src/lib.rs b/crates/proof/src/lib.rs index ee83f17a6..e6e3b856e 100644 --- a/crates/proof/src/lib.rs +++ b/crates/proof/src/lib.rs @@ -59,6 +59,7 @@ //! installed on the system, then the whole Moby word list built into the crate (see //! [`english_source`]). Hyphenation that needs the data is off without it; grammar and the //! rule-based hyphenation (Bulgarian, Turkish, Russian) are code and still work. +#![warn(missing_docs)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] pub mod affix; diff --git a/crates/quit/src/lib.rs b/crates/quit/src/lib.rs index 59e82012e..ef0bc9188 100644 --- a/crates/quit/src/lib.rs +++ b/crates/quit/src/lib.rs @@ -13,6 +13,7 @@ //! [`quit`] is that quit. With the `ui` feature, [`on_menu_event`] turns a native Quit menu item //! into a close request of the root window, and [`intercept_close`] holds a close while documents //! are unsaved. +#![warn(missing_docs)] mod close; #[cfg(target_os = "macos")] diff --git a/crates/review/src/lib.rs b/crates/review/src/lib.rs index 3f8a8f2f3..c27a790fd 100644 --- a/crates/review/src/lib.rs +++ b/crates/review/src/lib.rs @@ -4,6 +4,7 @@ //! //! Review data is the app's document data: every widget reads it and reports edits; nothing here //! owns or stores it. +#![warn(missing_docs)] pub mod annotate; pub mod comments; diff --git a/crates/settings/src/lib.rs b/crates/settings/src/lib.rs index a045bd126..79d4869a7 100644 --- a/crates/settings/src/lib.rs +++ b/crates/settings/src/lib.rs @@ -34,6 +34,7 @@ //! store.update(|p| p.appearance.theme = "dark".into()); //! // Call `store.tick(Instant::now())` every frame and `store.flush()` on exit. //! ``` +#![warn(missing_docs)] pub mod document; pub mod error; diff --git a/crates/table/src/lib.rs b/crates/table/src/lib.rs index 7d2ae6a3e..9ec49bb9c 100644 --- a/crates/table/src/lib.rs +++ b/crates/table/src/lib.rs @@ -1,6 +1,7 @@ //! Spreadsheet widgets: the cell grid and the tools around it (outline bands, field lists, //! conditions, charts, slicers, reference picking, statistics, error tags, filter buttons). //! UI-only: everything is in [`ui`], behind the `ui` feature. +#![warn(missing_docs)] #[cfg(feature = "ui")] pub mod ui; diff --git a/crates/text/src/lib.rs b/crates/text/src/lib.rs index 44cb45bd1..ade6753d6 100644 --- a/crates/text/src/lib.rs +++ b/crates/text/src/lib.rs @@ -27,6 +27,7 @@ //! //! Language features (`spanish`, `german`, …, `all-languages`) add data for that language and //! turn on the modules that use it. +#![warn(missing_docs)] #[cfg(feature = "bidi")] pub mod bidi; diff --git a/crates/theme-store/src/lib.rs b/crates/theme-store/src/lib.rs index 2539ff8d6..1bc69e208 100644 --- a/crates/theme-store/src/lib.rs +++ b/crates/theme-store/src/lib.rs @@ -34,6 +34,7 @@ //! let selection = accepted.suite.with_defaults(&defaults); //! assert_eq!((selection.theme.light, selection.mode), (graphite.id, ModeChoice::Dark)); //! ``` +#![warn(missing_docs)] mod backend; mod client; diff --git a/crates/theme/src/lib.rs b/crates/theme/src/lib.rs index 094e3a557..1db70b95a 100644 --- a/crates/theme/src/lib.rs +++ b/crates/theme/src/lib.rs @@ -20,6 +20,7 @@ //! let resolved = resolve(&theme, appearance, None); //! assert!(resolved.warnings.is_empty()); //! ``` +#![warn(missing_docs)] mod app_sizes; mod builtins; diff --git a/crates/ui-bench/src/lib.rs b/crates/ui-bench/src/lib.rs index 14ae75478..4dd7dbfb2 100644 --- a/crates/ui-bench/src/lib.rs +++ b/crates/ui-bench/src/lib.rs @@ -3,6 +3,7 @@ //! The scenario list, the measurement and the report are shared. A library supplies a //! [`Library`]: the foundation binary runs [`run_all`] over it and writes `baseline/foundation.json`. It reads //! `baseline/legacy.json`, the recorded baseline of the old library, as its speed gate. +#![warn(missing_docs)] mod alloc; mod harness; diff --git a/crates/ui-canvas/src/lib.rs b/crates/ui-canvas/src/lib.rs index 105ff7e1e..1ead5c8e7 100644 --- a/crates/ui-canvas/src/lib.rs +++ b/crates/ui-canvas/src/lib.rs @@ -5,6 +5,7 @@ //! //! The root re-exports craft-ui-panels' modules and the ones it re-exports; `dialog` adds the full-window family to //! panels' dialogs. +#![warn(missing_docs)] // The derives' output names the crate as `craft_ui`, here as in every other crate. extern crate self as craft_ui; diff --git a/crates/ui-contract/src/lib.rs b/crates/ui-contract/src/lib.rs index 8dc72071c..9a6007b49 100644 --- a/crates/ui-contract/src/lib.rs +++ b/crates/ui-contract/src/lib.rs @@ -5,6 +5,7 @@ //! //! The crates above it re-export these modules at their roots, so `crate::runtime::…` and `craft_ui::contract::…` //! name the same items in every crate of the library. +#![warn(missing_docs)] // The derives' output names the crate as `craft_ui`, here as in every other crate. extern crate self as craft_ui; diff --git a/crates/ui-gallery/src/lib.rs b/crates/ui-gallery/src/lib.rs index e9a48f277..e6a93e7dc 100644 --- a/crates/ui-gallery/src/lib.rs +++ b/crates/ui-gallery/src/lib.rs @@ -1,4 +1,5 @@ //! The craft-ui story viewer: the registered stories of the linked crates, shown under a chosen appearance. +#![warn(missing_docs)] pub mod chrome; pub mod viewer; diff --git a/crates/ui-macros/src/lib.rs b/crates/ui-macros/src/lib.rs index c3ed49cf7..8b2f79886 100644 --- a/crates/ui-macros/src/lib.rs +++ b/crates/ui-macros/src/lib.rs @@ -1,5 +1,6 @@ //! Macros of craft-ui: `#[derive(Component, Pattern, Props, ComponentStyle, TokenGroup, CommandSet, EnvValue)]`, //! `words!`, `#[story]`, `#[craft_ui::testing::trial]` and `register_contract!`. +#![warn(missing_docs)] mod command_set; mod component; diff --git a/crates/ui-panels/src/lib.rs b/crates/ui-panels/src/lib.rs index e9ff70cc6..8a7337eb4 100644 --- a/crates/ui-panels/src/lib.rs +++ b/crates/ui-panels/src/lib.rs @@ -4,6 +4,7 @@ //! patterns read without the canvas. //! //! The root re-exports craft-ui-widgets' modules and the ones it re-exports. +#![warn(missing_docs)] // The derives' output names the crate as `craft_ui`, here as in every other crate. extern crate self as craft_ui; diff --git a/crates/ui-patterns/src/lib.rs b/crates/ui-patterns/src/lib.rs index 88b10e027..906d4b154 100644 --- a/crates/ui-patterns/src/lib.rs +++ b/crates/ui-patterns/src/lib.rs @@ -3,6 +3,7 @@ //! The patterns of the craft UI library: ready-made dialogs, presets, preferences, dock areas and panels (layer 6). //! //! The root re-exports craft-ui-panels' modules and the ones it re-exports. +#![warn(missing_docs)] // The derives' output names the crate as `craft_ui`, here as in every other crate. extern crate self as craft_ui; diff --git a/crates/ui-shell/src/lib.rs b/crates/ui-shell/src/lib.rs index d683d9da2..c6db34059 100644 --- a/crates/ui-shell/src/lib.rs +++ b/crates/ui-shell/src/lib.rs @@ -3,6 +3,7 @@ //! The shell of the craft UI library: `AppShell`, the title bar and the eframe entry point (layer 7). //! //! The root re-exports craft-ui-panels' modules and the ones it re-exports. +#![warn(missing_docs)] // The derives' output names the crate as `craft_ui`, here as in every other crate. extern crate self as craft_ui; diff --git a/crates/ui-test-kit/src/lib.rs b/crates/ui-test-kit/src/lib.rs index f5af4be2f..bde456318 100644 --- a/crates/ui-test-kit/src/lib.rs +++ b/crates/ui-test-kit/src/lib.rs @@ -1,5 +1,6 @@ //! The test kits the craft-ui crates' integration binaries share: components written with the derives, and a //! frame driver for child viewports. Their registrations are this package's, so no library's suite runs them. +#![warn(missing_docs)] // The kits name the library as `craft_ui`, as the test files do. extern crate craft_ui_contract as craft_ui; diff --git a/crates/ui-widgets/src/lib.rs b/crates/ui-widgets/src/lib.rs index de0c538b2..3ec71b0ef 100644 --- a/crates/ui-widgets/src/lib.rs +++ b/crates/ui-widgets/src/lib.rs @@ -5,6 +5,7 @@ //! //! The root re-exports craft-ui-contract's modules, so components name them as `crate::runtime::…` and derive output //! as `craft_ui::…`. +#![warn(missing_docs)] // The derives' output names the crate as `craft_ui`, here as in every other crate. extern crate self as craft_ui; diff --git a/crates/ui/src/lib.rs b/crates/ui/src/lib.rs index 76fa60b08..f38a6b605 100644 --- a/crates/ui/src/lib.rs +++ b/crates/ui/src/lib.rs @@ -7,6 +7,7 @@ //! craft-ui-widgets, craft-ui-panels, then craft-ui-canvas, craft-ui-patterns and craft-ui-shell side by side. This //! crate re-exports all of them under one root, so every `craft_ui::…` path names the same item as in the crate that //! defines it. +#![warn(missing_docs)] pub use craft_ui_canvas::{canvas, canvas_controls, dialog}; #[cfg(feature = "testing")] diff --git a/crates/update/src/lib.rs b/crates/update/src/lib.rs index 0bd6792f2..97ff5e342 100644 --- a/crates/update/src/lib.rs +++ b/crates/update/src/lib.rs @@ -1,5 +1,5 @@ //! Native only (it downloads and installs through ureq): release checking, downloading, installing and self-updating for the Craft App Suite and ArtCraft Launcher. - +#![warn(missing_docs)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] pub mod app; diff --git a/crates/vectorcraft-format/src/lib.rs b/crates/vectorcraft-format/src/lib.rs index a2af8910d..02995e346 100644 --- a/crates/vectorcraft-format/src/lib.rs +++ b/crates/vectorcraft-format/src/lib.rs @@ -32,6 +32,7 @@ //! //! The crate takes and returns bytes. It does not open files or decompress past the first bytes //! [`sniff`] reads: a reader of a compressed file decompresses it with its own limits first. +#![warn(missing_docs)] pub mod base64; mod container; diff --git a/crates/web-api/src/lib.rs b/crates/web-api/src/lib.rs index 98d46ea6c..3528c518c 100644 --- a/crates/web-api/src/lib.rs +++ b/crates/web-api/src/lib.rs @@ -34,6 +34,7 @@ //! let page = Rc::new(PageApi::new("vectorcraft", Methods::default(), request)); //! page.install()?; // window.vectorcraft //! ``` +#![warn(missing_docs)] pub mod methods; pub mod reply; diff --git a/crates/win32/src/lib.rs b/crates/win32/src/lib.rs index 2c608c621..95c24f0c5 100644 --- a/crates/win32/src/lib.rs +++ b/crates/win32/src/lib.rs @@ -3,6 +3,7 @@ //! //! This is the only crate (besides the benchmark's allocator) that allows `unsafe`; the design-lint rule //! `contract/unsafe-allow` names it. Every block says why it is sound. +#![warn(missing_docs)] #![cfg(windows)] #![allow(unsafe_code)] diff --git a/crates/window/src/lib.rs b/crates/window/src/lib.rs index d57249b57..75eb10f87 100644 --- a/crates/window/src/lib.rs +++ b/crates/window/src/lib.rs @@ -56,6 +56,7 @@ //! //! [`restore`] (no egui) decides where a window opens, from the last session's geometry and the //! connected monitors, and keeps the `window.json` store beside `config.toml` on desktop (memory on the web). +#![warn(missing_docs)] pub mod capture; pub mod desktop;