2024-03-21 16:20:40 -05:00
|
|
|
//@aux-build:proc_macro_attr.rs
|
|
|
|
|
2024-02-27 08:25:18 -06:00
|
|
|
#![allow(unused)]
|
|
|
|
#![warn(clippy::empty_docs)]
|
2024-03-07 10:19:29 -06:00
|
|
|
#![allow(clippy::mixed_attributes_style)]
|
2024-03-21 16:20:40 -05:00
|
|
|
#![feature(extern_types)]
|
2024-03-07 10:19:29 -06:00
|
|
|
|
2024-02-27 08:25:18 -06:00
|
|
|
mod outer {
|
|
|
|
//!
|
|
|
|
|
|
|
|
/// this is a struct
|
|
|
|
struct Bananas {
|
|
|
|
/// count
|
|
|
|
count: usize,
|
|
|
|
}
|
|
|
|
|
|
|
|
///
|
|
|
|
enum Warn {
|
|
|
|
///
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
}
|
|
|
|
|
|
|
|
enum DontWarn {
|
|
|
|
/// i
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = ""]
|
|
|
|
fn warn_about_this() {}
|
|
|
|
|
|
|
|
#[doc = ""]
|
|
|
|
#[doc = ""]
|
|
|
|
fn this_doesn_warn() {}
|
|
|
|
|
|
|
|
#[doc = "a fine function"]
|
|
|
|
fn this_is_fine() {}
|
|
|
|
|
|
|
|
///
|
|
|
|
mod inner {
|
|
|
|
///
|
|
|
|
fn dont_warn_inner_outer() {
|
|
|
|
//!w
|
|
|
|
}
|
|
|
|
|
|
|
|
fn this_is_ok() {
|
|
|
|
//!
|
|
|
|
//! inside the function
|
|
|
|
}
|
|
|
|
|
|
|
|
fn warn() {
|
|
|
|
/*! */
|
|
|
|
}
|
|
|
|
|
|
|
|
fn dont_warn() {
|
|
|
|
/*! dont warn me */
|
|
|
|
}
|
|
|
|
|
|
|
|
trait NoDoc {
|
|
|
|
///
|
|
|
|
fn some() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
union Unite {
|
|
|
|
/// lint y
|
|
|
|
x: i32,
|
|
|
|
///
|
|
|
|
y: i32,
|
|
|
|
}
|
|
|
|
}
|
2024-03-21 16:20:40 -05:00
|
|
|
|
|
|
|
mod issue_12377 {
|
|
|
|
use proc_macro_attr::with_empty_docs;
|
|
|
|
|
|
|
|
#[with_empty_docs]
|
|
|
|
extern "C" {
|
|
|
|
type Test;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[with_empty_docs]
|
|
|
|
struct Foo {
|
|
|
|
a: u8,
|
|
|
|
}
|
|
|
|
}
|