about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKisaragi Marine <kisaragi.effective@gmail.com>2023-06-14 22:26:10 +0900
committerKisaragi Marine <kisaragi.effective@gmail.com>2023-06-14 22:27:26 +0900
commitaff9c01ab99dd7bb4a185df3a08e27f364fecf50 (patch)
tree25c952d78759fdb4f4eb06434e9716b34635d6aa
parent2fa72c7dfe89febb091699fe5d43fb4893d38d7f (diff)
downloadrust-aff9c01ab99dd7bb4a185df3a08e27f364fecf50.tar.gz
rust-aff9c01ab99dd7bb4a185df3a08e27f364fecf50.zip
address or allow clippy::missing_panics_doc in clippy-dev
-rw-r--r--clippy_dev/src/fmt.rs1
-rw-r--r--clippy_dev/src/lib.rs6
-rw-r--r--clippy_dev/src/new_lint.rs1
3 files changed, 8 insertions, 0 deletions
diff --git a/clippy_dev/src/fmt.rs b/clippy_dev/src/fmt.rs
index 25623144181..ee559d45dd1 100644
--- a/clippy_dev/src/fmt.rs
+++ b/clippy_dev/src/fmt.rs
@@ -35,6 +35,7 @@ struct FmtContext {
 }
 
 // the "main" function of cargo dev fmt
+#[allow(clippy::missing_panics_doc)]
 pub fn run(check: bool, verbose: bool) {
     fn try_run(context: &FmtContext) -> Result<bool, CliError> {
         let mut success = true;
diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs
index 56a269288c0..8aaa029f776 100644
--- a/clippy_dev/src/lib.rs
+++ b/clippy_dev/src/lib.rs
@@ -29,6 +29,10 @@ static CARGO_CLIPPY_EXE: &str = "cargo-clippy";
 static CARGO_CLIPPY_EXE: &str = "cargo-clippy.exe";
 
 /// Returns the path to the `cargo-clippy` binary
+///
+/// # Panics
+///
+/// Panics if the path of current executable could not be retrieved.
 #[must_use]
 pub fn cargo_clippy_path() -> PathBuf {
     let mut path = std::env::current_exe().expect("failed to get current executable name");
@@ -61,6 +65,8 @@ pub fn clippy_project_root() -> PathBuf {
     panic!("error: Can't determine root of project. Please run inside a Clippy working dir.");
 }
 
+/// # Panics
+/// Panics if given command result was failed.
 pub fn exit_if_err(status: io::Result<ExitStatus>) {
     match status.expect("failed to run command").code() {
         Some(0) => {},
diff --git a/clippy_dev/src/new_lint.rs b/clippy_dev/src/new_lint.rs
index f970a32726b..f0ccdb0fe10 100644
--- a/clippy_dev/src/new_lint.rs
+++ b/clippy_dev/src/new_lint.rs
@@ -36,6 +36,7 @@ impl<T> Context for io::Result<T> {
 /// # Errors
 ///
 /// This function errors out if the files couldn't be created or written to.
+#[allow(clippy::missing_panics_doc)]
 pub fn create(
     pass: &String,
     lint_name: Option<&String>,