From 447baf015e6f68d3a61ee9dabf59a49bd1427ffd Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 26 Oct 2016 17:34:45 -0700 Subject: [PATCH] Require documentation on filecheck public items. --- lib/filecheck/src/lib.rs | 2 ++ lib/filecheck/src/variable.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/filecheck/src/lib.rs b/lib/filecheck/src/lib.rs index f6c53c5dcf..66fe6036ab 100644 --- a/lib/filecheck/src/lib.rs +++ b/lib/filecheck/src/lib.rs @@ -234,6 +234,8 @@ //! This will match `"one, two"` , but not `"one,two"`. Without the `$()`, trailing whitespace //! would be trimmed from the pattern. +#![deny(missing_docs)] + pub use error::{Error, Result}; pub use variable::{VariableMap, Value, NO_VARIABLES}; pub use checker::{Checker, CheckerBuilder}; diff --git a/lib/filecheck/src/variable.rs b/lib/filecheck/src/variable.rs index 51bc38fc07..1a43f1428a 100644 --- a/lib/filecheck/src/variable.rs +++ b/lib/filecheck/src/variable.rs @@ -19,7 +19,9 @@ pub fn varname_prefix(s: &str) -> usize { /// A variable can contain either a regular expression or plain text. #[derive(Debug, Clone, PartialEq, Eq)] pub enum Value<'a> { + /// Verbatim text. Text(Cow<'a, str>), + /// Regular expression. Regex(Cow<'a, str>), }