aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-05-22 15:39:19 +0100
committerFlorian Diebold <[email protected]>2021-05-22 15:39:56 +0100
commita88c7c04d28d6263d7bca69ee3014e42185030de (patch)
tree8d9a00b7ec4bd882e6a62d86019f1b14c50a8025
parenta99de65573d59d6398f472b0d42daabe9e8a5410 (diff)
Add last remaining module docstring
-rw-r--r--crates/hir_ty/src/diagnostics/expr.rs4
-rw-r--r--xtask/src/tidy.rs23
2 files changed, 5 insertions, 22 deletions
diff --git a/crates/hir_ty/src/diagnostics/expr.rs b/crates/hir_ty/src/diagnostics/expr.rs
index b9a69b79c..53c4ee9da 100644
--- a/crates/hir_ty/src/diagnostics/expr.rs
+++ b/crates/hir_ty/src/diagnostics/expr.rs
@@ -1,4 +1,6 @@
1//! FIXME: write short doc here 1//! Various diagnostics for expressions that are collected together in one pass
2//! through the body using inference results: mismatched arg counts, missing
3//! fields, etc.
2 4
3use std::sync::Arc; 5use std::sync::Arc;
4 6
diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs
index f97e751c5..82b33a7a0 100644
--- a/xtask/src/tidy.rs
+++ b/xtask/src/tidy.rs
@@ -1,7 +1,4 @@
1use std::{ 1use std::path::{Path, PathBuf};
2 collections::HashMap,
3 path::{Path, PathBuf},
4};
5 2
6use xshell::{cmd, pushd, pushenv, read_file}; 3use xshell::{cmd, pushd, pushenv, read_file};
7 4
@@ -392,25 +389,9 @@ impl TidyDocs {
392 ) 389 )
393 } 390 }
394 391
395 let poorly_documented = ["hir_ty"]; 392 for path in self.contains_fixme {
396
397 let mut has_fixmes =
398 poorly_documented.iter().map(|it| (*it, false)).collect::<HashMap<&str, bool>>();
399 'outer: for path in self.contains_fixme {
400 for krate in poorly_documented.iter() {
401 if path.components().any(|it| it.as_os_str() == *krate) {
402 has_fixmes.insert(krate, true);
403 continue 'outer;
404 }
405 }
406 panic!("FIXME doc in a fully-documented crate: {}", path.display()) 393 panic!("FIXME doc in a fully-documented crate: {}", path.display())
407 } 394 }
408
409 for (krate, has_fixme) in has_fixmes.iter() {
410 if !has_fixme {
411 panic!("crate {} is fully documented :tada:, remove it from the list of poorly documented crates", krate)
412 }
413 }
414 } 395 }
415} 396}
416 397