Skip to content

Commit aff9c01

Browse files
address or allow clippy::missing_panics_doc in clippy-dev
1 parent 2fa72c7 commit aff9c01

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

clippy_dev/src/fmt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ struct FmtContext {
3535
}
3636

3737
// the "main" function of cargo dev fmt
38+
#[allow(clippy::missing_panics_doc)]
3839
pub fn run(check: bool, verbose: bool) {
3940
fn try_run(context: &FmtContext) -> Result<bool, CliError> {
4041
let mut success = true;

clippy_dev/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ static CARGO_CLIPPY_EXE: &str = "cargo-clippy";
2929
static CARGO_CLIPPY_EXE: &str = "cargo-clippy.exe";
3030

3131
/// Returns the path to the `cargo-clippy` binary
32+
///
33+
/// # Panics
34+
///
35+
/// Panics if the path of current executable could not be retrieved.
3236
#[must_use]
3337
pub fn cargo_clippy_path() -> PathBuf {
3438
let mut path = std::env::current_exe().expect("failed to get current executable name");
@@ -61,6 +65,8 @@ pub fn clippy_project_root() -> PathBuf {
6165
panic!("error: Can't determine root of project. Please run inside a Clippy working dir.");
6266
}
6367

68+
/// # Panics
69+
/// Panics if given command result was failed.
6470
pub fn exit_if_err(status: io::Result<ExitStatus>) {
6571
match status.expect("failed to run command").code() {
6672
Some(0) => {},

clippy_dev/src/new_lint.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ impl<T> Context for io::Result<T> {
3636
/// # Errors
3737
///
3838
/// This function errors out if the files couldn't be created or written to.
39+
#[allow(clippy::missing_panics_doc)]
3940
pub fn create(
4041
pass: &String,
4142
lint_name: Option<&String>,

0 commit comments

Comments
 (0)