]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/new_without_default.rs
Ignore associated items in trait *implementations* when considering type complexity
[rust.git] / tests / ui / new_without_default.rs
index 64659b63f469934e3f0aecc5e8359fbaeb557b78..4b2e7444dcf63251932ba94ee3c4ace4e59be4dc 100644 (file)
@@ -1,4 +1,3 @@
-#![feature(const_fn)]
 #![allow(dead_code, clippy::missing_safety_doc)]
 #![warn(clippy::new_without_default)]
 
@@ -174,4 +173,16 @@ pub fn new() -> Self {
     }
 }
 
+pub mod issue7220 {
+    pub struct Foo<T> {
+        _bar: *mut T,
+    }
+
+    impl<T> Foo<T> {
+        pub fn new() -> Self {
+            todo!()
+        }
+    }
+}
+
 fn main() {}