]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/new_without_default.rs
Merge commit 'fdb84cbfd25908df5683f8f62388f663d9260e39' into clippyup
[rust.git] / src / tools / clippy / tests / ui / new_without_default.rs
index 538927b18055a289c771f5cb1cfdc1ba9bfad531..65809023f8dff129d3d3d734c72d09def63b74c9 100644 (file)
@@ -212,3 +212,17 @@ pub fn new() -> Self {
 }
 
 fn main() {}
+
+pub struct IgnoreConstGenericNew(usize);
+impl IgnoreConstGenericNew {
+    pub fn new<const N: usize>() -> Self {
+        Self(N)
+    }
+}
+
+pub struct IgnoreLifetimeNew;
+impl IgnoreLifetimeNew {
+    pub fn new<'a>() -> Self {
+        Self
+    }
+}