| //@aux-build:proc_macros.rs | |
| #![feature(custom_inner_attributes)] | |
| #![warn(clippy::four_forward_slashes)] | |
| #![no_main] | |
| #![rustfmt::skip] | |
| #[macro_use] | |
| extern crate proc_macros; | |
| /// whoops | |
| //~^ four_forward_slashes | |
| fn a() {} | |
| /// whoops | |
| //~^ four_forward_slashes | |
| fn b() {} | |
| /// whoops | |
| /// two borked comments! | |
| //~^^ four_forward_slashes | |
| #[track_caller] | |
| fn c() {} | |
| fn d() {} | |
| #[test] | |
| /// between attributes | |
| //~^ four_forward_slashes | |
| fn g() {} | |
| /// not very start of contents | |
| //~^ four_forward_slashes | |
| fn h() {} | |
| fn i() { | |
| //// don't lint me bozo | |
| todo!() | |
| } | |
| external! { | |
| //// don't lint me bozo | |
| fn e() {} | |
| } | |
| with_span! { | |
| span | |
| //// don't lint me bozo | |
| fn f() {} | |
| } | |
| // Regression test for #16168: an inner doc comment (`//!`) inside the body must not | |
| // drag the `////` scan down into the body and flag a regular comment there. | |
| fn inner_doc() { | |
| //// I am not a doc comment! | |
| //! inner doc comment | |
| } |