]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/functions.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / functions.rs
index 271754cb06ee7eb7ffa4ac7a598d62b41a335a22..18149bfbc3fe0c4da555de4ff6edb0ceafbebfad 100644 (file)
@@ -1,6 +1,6 @@
 #![warn(clippy::all)]
-#![allow(dead_code)]
-#![allow(unused_unsafe, clippy::missing_safety_doc)]
+#![allow(dead_code, unused_unsafe)]
+#![allow(clippy::missing_safety_doc, clippy::uninlined_format_args)]
 
 // TOO_MANY_ARGUMENTS
 fn good(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool) {}
@@ -78,6 +78,14 @@ pub fn public(p: *const u8) {
     unsafe { std::ptr::read(p) };
 }
 
+type Alias = *const u8;
+
+pub fn type_alias(p: Alias) {
+    println!("{}", unsafe { *p });
+    println!("{:?}", unsafe { p.as_ref() });
+    unsafe { std::ptr::read(p) };
+}
+
 impl Bar {
     fn private(self, p: *const u8) {
         println!("{}", unsafe { *p });