rust/tests/ui/empty_docs.rs

64 lines
624 B
Rust
Raw Normal View History

2024-02-25 09:55:58 +04:00
#![allow(unused)]
#![warn(clippy::empty_docs)]
/// this is a struct
struct Bananas {
/// count
count: usize,
}
///
enum Warn {
///
A,
///
B,
}
2024-02-25 16:11:14 +04:00
enum WarnA {
///
A,
B,
}
enum DontWarn {
2024-02-25 09:55:58 +04:00
/// it's ok
A,
///
B,
}
#[doc = ""]
fn warn_about_this() {}
2024-02-25 16:11:14 +04:00
#[doc = ""]
#[doc = ""]
fn this_doesn_warn() {}
2024-02-25 09:55:58 +04:00
#[doc = "a fine function"]
fn this_is_fine() {}
fn warn_about_this_as_well() {
//!
}
2024-02-25 16:11:14 +04:00
///
fn warn_inner_outer() {
2024-02-25 18:01:53 +04:00
//!w
2024-02-25 16:11:14 +04:00
}
2024-02-25 09:55:58 +04:00
fn this_is_ok() {
//!
//! inside the function
}
fn warn() {
2024-02-25 16:11:14 +04:00
/*! */
}
fn dont_warn() {
/*! dont warn me */
2024-02-25 09:55:58 +04:00
}
trait NoDoc {}