]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/doc_unsafe.rs
1 // aux-build:doc_unsafe_macros.rs
4 extern crate doc_unsafe_macros
;
6 /// This is not sufficiently documented
7 pub unsafe fn destroy_the_planet() {
15 /// This function shouldn't be called unless the horsemen are ready
16 pub unsafe fn apocalypse(universe
: &mut ()) {
20 /// This is a private function, so docs aren't necessary
21 unsafe fn you_dont_see_me() {
26 pub unsafe fn only_crate_wide_accessible() {
30 pub unsafe fn republished() {
35 pub use private_mod
::republished
;
37 pub trait UnsafeTrait
{
38 unsafe fn woefully_underdocumented(self);
41 unsafe fn at_least_somewhat_documented(self);
46 impl UnsafeTrait
for Struct
{
47 unsafe fn woefully_underdocumented(self) {
51 unsafe fn at_least_somewhat_documented(self) {
57 pub unsafe fn more_undocumented_unsafe() -> Self {
62 pub unsafe fn somewhat_documented(&self) {
66 unsafe fn private(&self) {
71 macro_rules
! very_unsafe
{
73 pub unsafe fn whee() {
79 /// Please keep the seat belt fastened
80 pub unsafe fn drive() {
88 // we don't lint code from external macros
95 let mut universe
= ();
96 apocalypse(&mut universe
);
97 private_mod
::only_crate_wide_accessible();