about summary refs log tree commit diff
path: root/clippy_dev/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'clippy_dev/src/lib.rs')
-rw-r--r--clippy_dev/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
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) => {},