diff --git a/ui_test/src/comments.rs b/ui_test/src/comments.rs index e83e84b22a1..e6e45de4160 100644 --- a/ui_test/src/comments.rs +++ b/ui_test/src/comments.rs @@ -9,7 +9,7 @@ mod tests; /// configuration values. This struct parses them all in one go and then they /// get processed by their respective use sites. #[derive(Default, Debug)] -pub struct Comments { +pub(crate) struct Comments { /// List of revision names to execute. Can only be speicified once pub revisions: Option>, /// Don't run this test if any of these filters apply @@ -30,21 +30,21 @@ pub struct Comments { } #[derive(Debug)] -pub struct ErrorMatch { +pub(crate) struct ErrorMatch { pub matched: String, pub revision: Option, pub definition_line: usize, } impl Comments { - pub fn parse_file(path: &Path) -> Self { + pub(crate) fn parse_file(path: &Path) -> Self { let content = std::fs::read_to_string(path).unwrap(); Self::parse(path, &content) } /// Parse comments in `content`. /// `path` is only used to emit diagnostics if parsing fails. - pub fn parse(path: &Path, content: &str) -> Self { + pub(crate) fn parse(path: &Path, content: &str) -> Self { let mut this = Self::default(); let error_pattern_regex = Regex::new(r"//(\[(?P[^\]]+)\])?~[|^]*\s*(ERROR|HELP|WARN)?:?(?P.*)") diff --git a/ui_test/src/lib.rs b/ui_test/src/lib.rs index 4a3014713b2..dd5a1d06243 100644 --- a/ui_test/src/lib.rs +++ b/ui_test/src/lib.rs @@ -9,7 +9,7 @@ use comments::ErrorMatch; use crossbeam::queue::SegQueue; use regex::Regex; -pub use crate::comments::Comments; +use crate::comments::Comments; mod comments; #[cfg(test)]