rust/tests/ui/empty_docs.rs

62 lines
612 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,
}
2024-02-25 12:11:14 +00:00
enum WarnA {
///
A,
B,
}
enum DontWarn {
2024-02-25 05:55:58 +00:00
/// it's ok
A,
///
B,
}
#[doc = ""]
fn warn_about_this() {}
2024-02-25 12:11:14 +00:00
#[doc = ""]
#[doc = ""]
fn this_doesn_warn() {}
2024-02-25 05:55:58 +00:00
#[doc = "a fine function"]
fn this_is_fine() {}
fn warn_about_this_as_well() {
//!
}
2024-02-25 12:11:14 +00:00
///
fn warn_inner_outer() {
//! what
}
2024-02-25 05:55:58 +00:00
fn this_is_ok() {
//!
//! inside the function
}
fn warn() {
2024-02-25 12:11:14 +00:00
/*! */
}
fn dont_warn() {
/*! dont warn me */
2024-02-25 05:55:58 +00:00
}