rust-clippy/tests/ui/empty_docs.rs

44 lines
469 B
Rust
Raw Normal View History

2024-02-25 05:55:58 +00:00
#![allow(unused)]
#![warn(clippy::empty_docs)]
/// this is a struct
struct Bananas {
/// count
count: usize,
}
///
enum Warn {
///
A,
///
B,
}
enum WarnForB {
/// it's ok
A,
///
B,
}
#[doc = ""]
#[doc = ""]
fn warn_about_this() {}
#[doc = "a fine function"]
fn this_is_fine() {}
fn warn_about_this_as_well() {
//!
}
fn this_is_ok() {
//!
//! inside the function
}
fn warn() {
/*! inside the function */
}