1 #![warn(clippy::undocumented_unsafe_blocks)]
51 fn local_tuple_expression() {
53 let _ = (42, unsafe {});
61 fn line_comment_newlines() {
67 fn line_comment_empty() {
75 fn line_comment_with_extras() {
76 // This is a description
86 fn block_comment_newlines() {
93 fn inline_block_comment() {
94 /* Safety: */unsafe {}
97 fn block_comment_with_extras() {
98 /* This is a description
104 fn block_comment_terminator_same_line() {
105 /* This is a description
111 // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
112 // incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
113 // ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
114 // reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
115 // occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
117 // Tellus elementum sagittis vitae et leo duis ut diam quam. Sit amet nulla facilisi
118 // morbi tempus iaculis urna. Amet luctus venenatis lectus magna. At quis risus sed vulputate odio
119 // ut. Luctus venenatis lectus magna fringilla urna. Tortor id aliquet lectus proin nibh nisl
120 // condimentum id venenatis. Vulputate dignissim suspendisse in est ante in nibh mauris cursus.
124 fn safety_with_prepended_text() {
125 // This is a test. Safety:
129 fn local_line_comment() {
134 fn local_block_comment() {
141 let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
146 let _ = (42, unsafe {}, "test", unsafe {});
151 let _ = *unsafe { &42 };
154 #[allow(clippy::match_single_binding)]
157 let _ = match unsafe {} {
162 fn comment_addr_of() {
167 fn comment_repeat() {
169 let _ = [unsafe {}; 5];
172 fn comment_macro_call() {
185 fn comment_macro_def() {
196 fn non_ascii_comment() {
201 fn local_commented_block() {
209 let _ = [(42, unsafe {}, unsafe {}), (52, unsafe {}, unsafe {})];
218 fn no_comment_array() {
219 let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
222 fn no_comment_tuple() {
223 let _ = (42, unsafe {}, "test", unsafe {});
226 fn no_comment_unary() {
227 let _ = *unsafe { &42 };
230 #[allow(clippy::match_single_binding)]
231 fn no_comment_match() {
232 let _ = match unsafe {} {
237 fn no_comment_addr_of() {
241 fn no_comment_repeat() {
242 let _ = [unsafe {}; 5];
245 fn local_no_comment() {
249 fn no_comment_macro_call() {
259 fn no_comment_macro_def() {
269 fn trailing_comment() {
273 fn internal_comment() {
287 pub fn print_binary_tree() {
288 println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });